mirror of
https://github.com/restic/restic.git
synced 2026-07-12 18:25:10 +00:00
Modernize internal/cache error handling
This commit is contained in:
committed by
Michael Eischer
parent
ea04f40eb3
commit
6586e90acf
Vendored
+1
-1
@@ -99,7 +99,7 @@ func (c *Cache) Save(h restic.Handle, rd io.Reader) error {
|
||||
finalname := c.filename(h)
|
||||
dir := filepath.Dir(finalname)
|
||||
err := fs.Mkdir(dir, 0700)
|
||||
if err != nil && !os.IsExist(err) {
|
||||
if err != nil && !errors.Is(err, os.ErrExist) {
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user