forked from TrueCloudLab/restic
cache: Return error during default dir detection
This commit is contained in:
parent
bb44855078
commit
fe1f151ae1
1 changed files with 3 additions and 0 deletions
3
internal/cache/cache.go
vendored
3
internal/cache/cache.go
vendored
|
@ -86,6 +86,9 @@ func writeCachedirTag(dir string) error {
|
|||
func New(id string, basedir string) (c *Cache, err error) {
|
||||
if basedir == "" {
|
||||
basedir, err = DefaultDir()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
err = mkdirCacheDir(basedir)
|
||||
|
|
Loading…
Reference in a new issue