local: return fs.ErrorDirNot found from About and Purge
Before this a stat error was returned which wasn't very helpful.
This commit is contained in:
parent
d2ad293fae
commit
52247e9a9f
2 changed files with 8 additions and 0 deletions
|
@ -625,6 +625,10 @@ func (f *Fs) Purge(ctx context.Context, dir string) error {
|
|||
dir = f.localPath(dir)
|
||||
fi, err := f.lstat(dir)
|
||||
if err != nil {
|
||||
// already purged
|
||||
if os.IsNotExist(err) {
|
||||
return fs.ErrorDirNotFound
|
||||
}
|
||||
return err
|
||||
}
|
||||
if !fi.Mode().IsDir() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue