mirror of
https://github.com/rclone/rclone.git
synced 2025-12-06 00:03:32 +00:00
Fix issues identified by go vet -shadow - fixes #530
This commit is contained in:
@@ -366,13 +366,13 @@ func (f *Fs) listOneLevel(out fs.ListOpts, dir string) {
|
|||||||
if dir != "" {
|
if dir != "" {
|
||||||
root += "/" + dir
|
root += "/" + dir
|
||||||
}
|
}
|
||||||
entry, err := f.db.Metadata(root, true, false, "", "", metadataLimit)
|
dirEntry, err := f.db.Metadata(root, true, false, "", "", metadataLimit)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
out.SetError(errors.Wrap(err, "couldn't list single level"))
|
out.SetError(errors.Wrap(err, "couldn't list single level"))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
for i := range entry.Contents {
|
for i := range dirEntry.Contents {
|
||||||
entry := &entry.Contents[i]
|
entry := &dirEntry.Contents[i]
|
||||||
remote, err := strip(entry.Path, root)
|
remote, err := strip(entry.Path, root)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
out.SetError(err)
|
out.SetError(err)
|
||||||
|
|||||||
@@ -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) {
|
list := func(fs Fs, includeAll bool, pMap *map[string]Object, pErr *error) {
|
||||||
defer wg.Done()
|
defer wg.Done()
|
||||||
Log(fs, "Building file list")
|
Log(fs, "Building file list")
|
||||||
dstFiles, listErr := readFilesMap(fs, includeAll, dir)
|
files, listErr := readFilesMap(fs, includeAll, dir)
|
||||||
if listErr != nil {
|
if listErr != nil {
|
||||||
ErrorLog(fs, "Error building file list: %v", listErr)
|
ErrorLog(fs, "Error building file list: %v", listErr)
|
||||||
*pErr = listErr
|
*pErr = listErr
|
||||||
} else {
|
} else {
|
||||||
Debug(fs, "Done building file list")
|
Debug(fs, "Done building file list")
|
||||||
*pMap = dstFiles
|
*pMap = files
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user