mirror of
https://github.com/rclone/rclone.git
synced 2025-01-24 12:56:36 +02:00
vfs: add a newly created file straight into the directory
This commit is contained in:
parent
1e423d21e1
commit
6150ae89d6
@ -589,6 +589,10 @@ func (f *File) Open(flags int) (fd Handle, err error) {
|
|||||||
fs.Errorf(f, "Can't figure out how to open with flags: 0x%X", flags)
|
fs.Errorf(f, "Can't figure out how to open with flags: 0x%X", flags)
|
||||||
return nil, EPERM
|
return nil, EPERM
|
||||||
}
|
}
|
||||||
|
// if creating a file, add the file to the directory
|
||||||
|
if err == nil && flags&os.O_CREATE != 0 {
|
||||||
|
f.d.addObject(f)
|
||||||
|
}
|
||||||
return fd, err
|
return fd, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user