From 1758621a51dded124cca9b1a943a63333ec5b2d6 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Wed, 4 Feb 2015 21:29:51 +0000 Subject: [PATCH] drive: fix subdirectory listing to not list entire drive - fixes #23 This was causing inexplicably slow transfers on subdirectories of drives with lots of files. --- drive/drive.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drive/drive.go b/drive/drive.go index 83a8a5da9..0aca61645 100644 --- a/drive/drive.go +++ b/drive/drive.go @@ -559,7 +559,7 @@ func (f *FsDrive) List() fs.ObjectsChan { fs.Stats.Error() log.Printf("Couldn't find root: %s", err) } else { - if *driveFullList { + if f.root == "" && *driveFullList { err = f.listDirFull(f.rootId, "", out) } else { err = f.listDirRecursive(f.rootId, "", out)