mirror of
https://github.com/restic/restic.git
synced 2026-11-04 14:29:21 +00:00
repository: Add more debug to Create()
This commit is contained in:
1 parent
47212dde8c
commit
0ad3d71f01
1 file changed
+4
-1
@@ -372,7 +372,7 @@ func (s *Repository) SaveJSONUnpacked(t backend.Type, item interface{}) (backend
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
debug.Log("Repo.SaveJSONUnpacked", "create new file %p", blob)
|
||||
debug.Log("Repo.SaveJSONUnpacked", "create new blob %v", t)
|
||||
|
||||
// hash
|
||||
hw := backend.NewHashingWriter(blob, sha256.New())
|
||||
@@ -396,9 +396,12 @@ func (s *Repository) SaveJSONUnpacked(t backend.Type, item interface{}) (backend
|
||||
|
||||
err = blob.Finalize(t, sid.String())
|
||||
if err != nil {
|
||||
debug.Log("Repo.SaveJSONUnpacked", "error saving blob %v as %v: %v", t, sid, err)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
debug.Log("Repo.SaveJSONUnpacked", "new blob %v saved as %v", t, sid)
|
||||
|
||||
return sid, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user