2
2
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:
Alexander Neumann 2017-11-20 06:10:42 +01:00
parent bb44855078
commit fe1f151ae1

View File

@ -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)