fix: scope FileBrowser DB reset to restore-only path

Normal storage add/remove no longer nukes the FileBrowser database volume.
A .fb-reset flag file is written during restore and consumed on next startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-26 15:35:22 +01:00
parent 1e9300e5a0
commit f6caea8067
4 changed files with 32 additions and 7 deletions
+5
View File
@@ -875,6 +875,11 @@ func (s *Server) restoreFromInfraBackup(ib *report.InfraBackup) {
}
}
}
// Signal that FileBrowser's database should be reset on next startup.
// After restore, the DB has stale source preferences from the initial install.
flagPath := filepath.Join(s.dataDir, ".fb-reset")
_ = os.WriteFile(flagPath, []byte("restore"), 0644)
}
// mountDrivesFromBackup mounts drives from the infra backup's disk layout.