🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
fix(backup): surface real SQLite error when backup step fails
Deluan1f3a7efa759c
diff --git a/db/backup.go b/db/backup.goindex 8b0f18b1b..a34255d7e 100644--- a/db/backup.go+++ b/db/backup.go@@ -81,12 +81,12 @@ func backupOrRestore(ctx context.Context, isBackup bool, path string) error {// Caution: -1 means that sqlite will hold a read lock until the operation finishes// This will lock out other writes that could happen at the same timedone, err := backupOp.Step(-1)- if !done {- return fmt.Errorf("backup not done with step -1")- }if err != nil {return fmt.Errorf("error during backup step: %w", err)}+ if !done {+ return fmt.Errorf("backup not done with step -1")+ }err = backupOp.Finish()if err != nil {