mirror of
https://github.com/restic/restic.git
synced 2025-08-15 00:57:27 +00:00
Modernize internal/cache error handling
This commit is contained in:

committed by
Michael Eischer

parent
ea04f40eb3
commit
6586e90acf
2
internal/cache/file.go
vendored
2
internal/cache/file.go
vendored
@@ -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