mirror of
https://github.com/restic/restic.git
synced 2025-08-20 10:57:31 +00:00
repository: Add more debug to Create()
This commit is contained in:
@@ -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