mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 15:30:06 +08:00
sftp: fix detection of file vs directory
This commit is contained in:
parent
efbb040e3f
commit
84b12574de
|
@ -151,7 +151,7 @@ func NewFs(name, root string) (fs.Fs, error) {
|
|||
}
|
||||
_, err := f.NewObject(remote)
|
||||
if err != nil {
|
||||
if err == fs.ErrorObjectNotFound {
|
||||
if err == fs.ErrorObjectNotFound || errors.Cause(err) == fs.ErrorNotAFile {
|
||||
// File doesn't exist so return old f
|
||||
f.root = root
|
||||
return f, nil
|
||||
|
|
Loading…
Reference in New Issue
Block a user