http: fix race introduced in 7982aaf151

s3-about
Nick Craig-Wood 2019-09-14 08:48:13 +01:00
parent 3b68340eac
commit 1a16849df0
1 changed files with 1 additions and 1 deletions

View File

@ -456,7 +456,7 @@ func (f *Fs) List(ctx context.Context, dir string) (entries fs.DirEntries, err e
fs: f,
remote: remote,
}
switch err = file.stat(ctx); err {
switch err := file.stat(ctx); err {
case nil:
add(file)
case fs.ErrorNotAFile: