fix: persist FileBrowser database + sync on manual storage add
- Add server.database to generated config.yaml pointing to the persistent data volume. Previously the database was at /home/filebrowser/database.db (outside the volume) and was lost on every container recreation. - Call syncFileBrowserMounts after manual storage path add, so newly registered drives (like sys_drive) also appear in FileBrowser. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1166,6 +1166,7 @@ func (s *Server) settingsStorageAddHandler(w http.ResponseWriter, r *http.Reques
|
||||
}
|
||||
|
||||
s.logger.Printf("[INFO] Storage path added: %s (%s)", path, label)
|
||||
go s.syncFileBrowserMounts()
|
||||
http.Redirect(w, r, "/settings?storage_msg=success&storage_detail="+url.QueryEscape("Adattároló sikeresen hozzáadva: "+path), http.StatusFound)
|
||||
}
|
||||
|
||||
@@ -1404,6 +1405,7 @@ func generateFileBrowserConfig(paths []settings.StoragePath) string {
|
||||
server:
|
||||
port: 80
|
||||
baseURL: "/"
|
||||
database: "/home/filebrowser/data/database.db"
|
||||
logging:
|
||||
- levels: "info|warning|error"
|
||||
sources:
|
||||
|
||||
Reference in New Issue
Block a user