kept data: the list names a leftover by the app that binds it through HDD_PATH, never the file browser (R-692, found live on 9202)
gates / gates (push) Successful in 26s
gates / gates (push) Successful in 26s
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
@@ -244,11 +244,19 @@ func overlaps(a, b string) bool {
|
||||
func (m *Manager) ownerOf(drive, abs string) (string, string) {
|
||||
var cands []Stack
|
||||
for _, st := range m.GetStacks() {
|
||||
if st.ComposePath == "" {
|
||||
if st.ComposePath == "" || st.Protected {
|
||||
continue
|
||||
}
|
||||
// v0.274.0 (found live on 9202): only an app whose definition binds its drive folder THROUGH
|
||||
// ${HDD_PATH} can own one. The file browser's own compose binds every kept folder by its absolute
|
||||
// path (the read-only view), and matched first — the list named romm's and paperless's leftovers
|
||||
// "Filebrowser". Pinned by TestKept_OwnerIsNeverTheFileBrowser.
|
||||
if b, err := os.ReadFile(st.ComposePath); err != nil || !strings.Contains(string(b), "${HDD_PATH}") {
|
||||
continue
|
||||
}
|
||||
for _, p := range ParseComposeHDDMounts(st.ComposePath, drive) {
|
||||
if filepath.Clean(p) == abs {
|
||||
// the folder itself, or one inside it (paperless binds appdata/paperless/media and …/export)
|
||||
if c := filepath.Clean(p); c == abs || strings.HasPrefix(c, abs+string(filepath.Separator)) {
|
||||
cands = append(cands, st)
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user