v0.6.0: strengthen backup integrity
This commit is contained in:
@@ -49,7 +49,8 @@ func ConvertFromJSONL(dir string) (Manifest, error) {
|
||||
}
|
||||
|
||||
for id, e := range src.Entries() {
|
||||
dst.Add(id, e.Filename, e.Size, e.Cloud)
|
||||
e.ID = id
|
||||
dst.AddEntry(e)
|
||||
}
|
||||
|
||||
os.Remove(JSONLPath(dir))
|
||||
@@ -69,7 +70,8 @@ func ConvertFromSQLite(dir string) (Manifest, error) {
|
||||
}
|
||||
|
||||
for id, e := range src.Entries() {
|
||||
dst.Add(id, e.Filename, e.Size, e.Cloud)
|
||||
e.ID = id
|
||||
dst.AddEntry(e)
|
||||
}
|
||||
if err := dst.Save(); err != nil {
|
||||
return nil, fmt.Errorf("save jsonl: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user