mirror of
https://github.com/rclone/rclone
synced 2024-12-13 01:13:58 +01:00
Fix issues identified by go vet -shadow - fixes #530
This commit is contained in:
parent
a67c7461ee
commit
5a3b109e25
@ -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)
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user