From bdc638530eeea28d4d987602e3705d11a38c5621 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Sun, 3 Feb 2019 16:06:04 +0000 Subject: [PATCH] walk: make NewDirTree always use ListR #2946 This fixes vfs/refresh with recurse=true needing the --fast-list flag --- fs/walk/walk.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/walk/walk.go b/fs/walk/walk.go index 23534690f..cf6006da9 100644 --- a/fs/walk/walk.go +++ b/fs/walk/walk.go @@ -455,8 +455,8 @@ func walkNDirTree(f fs.Fs, path string, includeAll bool, maxLevel int, listDir l // If maxLevel is < 0 then it will recurse indefinitely, else it will // only do maxLevel levels. // -// This is implemented by WalkR if Config.UseRecursiveListing is true -// and f supports it and level > 1, or WalkN otherwise. +// This is implemented by WalkR if f supports ListR and level > 1, or +// WalkN otherwise. // // If --files-from is set then a DirTree will be constructed with just // those files in. @@ -466,7 +466,7 @@ func NewDirTree(f fs.Fs, path string, includeAll bool, maxLevel int) (DirTree, e if filter.Active.HaveFilesFrom() { return walkRDirTree(f, path, includeAll, maxLevel, filter.Active.MakeListR(f.NewObject)) } - if ListR := f.Features().ListR; (maxLevel < 0 || maxLevel > 1) && fs.Config.UseListR && ListR != nil { + if ListR := f.Features().ListR; (maxLevel < 0 || maxLevel > 1) && ListR != nil { return walkRDirTree(f, path, includeAll, maxLevel, ListR) } return walkNDirTree(f, path, includeAll, maxLevel, list.DirSorted)