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)