mirror of
https://github.com/octoleo/restic.git
synced 2024-11-25 22:27:35 +00:00
cache: Return error during default dir detection
This commit is contained in:
parent
bb44855078
commit
fe1f151ae1
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 New Issue
Block a user