mirror of
https://github.com/rclone/rclone.git
synced 2025-08-18 17:38:52 +02:00
drive, acd, onedrive: Cache the directory IDs when reading the parent directory
This makes directory listings much more efficient (one less transaction needed) and also fixes #1439 (which was caused by having to look up a directory name with quotes in which isn't dealt with well by the list routine) by not doing a directory lookup at all.
This commit is contained in:
@@ -405,6 +405,8 @@ func (f *Fs) ListDir(out fs.ListOpts, job dircache.ListDirJob) (jobs []dircache.
|
||||
switch *node.Kind {
|
||||
case folderKind:
|
||||
if out.IncludeDirectory(remote) {
|
||||
// cache the directory ID for later lookups
|
||||
f.dirCache.Put(remote, *node.Id)
|
||||
dir := &fs.Dir{
|
||||
Name: remote,
|
||||
Bytes: -1,
|
||||
|
Reference in New Issue
Block a user