acd, onedrive: make sure we have found the root before purging
If we don't, purge can try to trash the root node which fortunately doesn't succeed.
This commit is contained in:
@@ -753,6 +753,10 @@ func (f *Fs) purgeCheck(dir string, check bool) error {
|
||||
return errors.New("can't purge root directory")
|
||||
}
|
||||
dc := f.dirCache
|
||||
err := dc.FindRoot(false)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
rootID, err := dc.FindDir(dir, false)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user