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.
This commit is contained in:
Nick Craig-Wood 2015-02-04 21:29:51 +00:00
parent 5710247bf6
commit 1758621a51

View File

@ -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)