mirror of
https://github.com/rclone/rclone.git
synced 2025-03-14 00:16:24 +08:00
local: fix detection of directories in new object creation
This stops the local listing erroring on all symlinks
This commit is contained in:
parent
f7252645ba
commit
5fba913207
@ -162,7 +162,7 @@ func (f *Fs) newObjectWithInfo(remote string, info os.FileInfo) (fs.Object, erro
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if !o.info.Mode().IsRegular() {
|
||||
if o.info.Mode().IsDir() {
|
||||
return nil, errors.Wrapf(fs.ErrorNotAFile, "%q", remote)
|
||||
}
|
||||
return o, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user