mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 14:51:48 +08: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)
|
||||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user