mirror of
https://github.com/rclone/rclone.git
synced 2025-08-15 16:22:47 +02:00
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:
@ -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() {
|
||||
|
Reference in New Issue
Block a user