mirror of
https://github.com/rclone/rclone.git
synced 2026-09-17 18:40:19 -04:00
Rmdir checked that the directory existed with GetMetadata and then checked it was empty with ListFolder, but ListFolder already reports a missing path and a path that is a file, so the first request was redundant. Drop the GetMetadata call and map the ListFolder lookup errors onto the same sentinel errors as before, so a missing directory still returns fs.ErrorDirNotFound and a file still returns fs.ErrorIsFile. Limit is set to 1 as only the presence of an entry matters, and HasMore is checked as well so a full first page is not read as an empty directory.