Skip to content

Commit e08384e

Browse files
committed
return no error if file doesn't exist
1 parent 450b30f commit e08384e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

gcsfs/fs.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,14 @@ func (fs *Fs) RemoveAll(path string) error {
325325
}
326326

327327
pathInfo, err := fs.Stat(path)
328+
if errors.Is(err, ErrFileNotFound) {
329+
// return early if file doesn't exist
330+
return nil
331+
}
328332
if err != nil {
329333
return err
330334
}
335+
331336
if !pathInfo.IsDir() {
332337
return fs.Remove(path)
333338
}

0 commit comments

Comments
 (0)