diff --git a/backend/app/service/commands/compress.go b/backend/app/service/commands/compress.go index c9d777a..d6d5881 100644 --- a/backend/app/service/commands/compress.go +++ b/backend/app/service/commands/compress.go @@ -86,7 +86,6 @@ func commandCompress(dir string) error { if err := readDB(dir); err != nil { return errors.Wrap(err, "failed to read db") } - defer writeDB(dir) dirFiles, err := os.ReadDir(dir) if err != nil { @@ -123,6 +122,7 @@ func commandCompress(dir string) error { } compressed = append(compressed, compressedDB{Name: fileName, Md5: fileMd5}) + writeDB(dir) log.Infof("file %s compressed", fileName) }