Better error handling and logging for restorations

This commit is contained in:
Dane Everitt
2021-01-30 18:43:35 -08:00
parent 13541524c3
commit adc0732af3
7 changed files with 43 additions and 28 deletions

View File

@@ -1,6 +1,7 @@
package filesystem
import (
"emperror.dev/errors"
"github.com/apex/log"
"github.com/karrick/godirwalk"
"sync"
@@ -189,7 +190,7 @@ func (fs *Filesystem) DirectorySize(dir string) (int64, error) {
},
})
return size, err
return size, errors.WrapIf(err, "server/filesystem: directorysize: failed to walk directory")
}
// Helper function to determine if a server has space available for a file of a given size.