diff --git a/dropbox/dropbox.go b/dropbox/dropbox.go index 3f5a3b152..cbfdccd04 100644 --- a/dropbox/dropbox.go +++ b/dropbox/dropbox.go @@ -366,13 +366,13 @@ func (f *Fs) listOneLevel(out fs.ListOpts, dir string) { if dir != "" { root += "/" + dir } - entry, err := f.db.Metadata(root, true, false, "", "", metadataLimit) + dirEntry, err := f.db.Metadata(root, true, false, "", "", metadataLimit) if err != nil { out.SetError(errors.Wrap(err, "couldn't list single level")) return } - for i := range entry.Contents { - entry := &entry.Contents[i] + for i := range dirEntry.Contents { + entry := &dirEntry.Contents[i] remote, err := strip(entry.Path, root) if err != nil { out.SetError(err) diff --git a/fs/operations.go b/fs/operations.go index d688ce87d..c1b00cdec 100644 --- a/fs/operations.go +++ b/fs/operations.go @@ -514,13 +514,13 @@ func readFilesMaps(fdst Fs, fdstIncludeAll bool, fsrc Fs, fsrcIncludeAll bool, d list := func(fs Fs, includeAll bool, pMap *map[string]Object, pErr *error) { defer wg.Done() Log(fs, "Building file list") - dstFiles, listErr := readFilesMap(fs, includeAll, dir) + files, listErr := readFilesMap(fs, includeAll, dir) if listErr != nil { ErrorLog(fs, "Error building file list: %v", listErr) *pErr = listErr } else { Debug(fs, "Done building file list") - *pMap = dstFiles + *pMap = files } }