local: fix detection of directories in new object creation
This stops the local listing erroring on all symlinks
This commit is contained in:
+1
-1
@@ -162,7 +162,7 @@ func (f *Fs) newObjectWithInfo(remote string, info os.FileInfo) (fs.Object, erro
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !o.info.Mode().IsRegular() {
|
if o.info.Mode().IsDir() {
|
||||||
return nil, errors.Wrapf(fs.ErrorNotAFile, "%q", remote)
|
return nil, errors.Wrapf(fs.ErrorNotAFile, "%q", remote)
|
||||||
}
|
}
|
||||||
return o, nil
|
return o, nil
|
||||||
|
|||||||
Reference in New Issue
Block a user