forked from TrueCloudLab/restic
repository: Add more debug to Create()
This commit is contained in:
parent
47212dde8c
commit
0ad3d71f01
1 changed files with 4 additions and 1 deletions
|
@ -372,7 +372,7 @@ func (s *Repository) SaveJSONUnpacked(t backend.Type, item interface{}) (backend
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
debug.Log("Repo.SaveJSONUnpacked", "create new file %p", blob)
|
debug.Log("Repo.SaveJSONUnpacked", "create new blob %v", t)
|
||||||
|
|
||||||
// hash
|
// hash
|
||||||
hw := backend.NewHashingWriter(blob, sha256.New())
|
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())
|
err = blob.Finalize(t, sid.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
debug.Log("Repo.SaveJSONUnpacked", "error saving blob %v as %v: %v", t, sid, err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
debug.Log("Repo.SaveJSONUnpacked", "new blob %v saved as %v", t, sid)
|
||||||
|
|
||||||
return sid, nil
|
return sid, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue