mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 15:30:06 +08:00
vfs: add open files to directories
This commit is contained in:
parent
61b6159a05
commit
eab55ce882
|
@ -104,6 +104,7 @@ func (fh *RWFileHandle) openPending(truncate bool) (err error) {
|
|||
fh.File = fd
|
||||
fh.opened = true
|
||||
fh.d.vfs.cache.open(fh.osPath)
|
||||
fh.d.addObject(fh.file) // make sure the directory has this object in it now
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -51,6 +51,7 @@ func newWriteFileHandle(d *Dir, f *File, remote string) (*WriteFileHandle, error
|
|||
}()
|
||||
fh.file.addWriter(fh)
|
||||
fh.file.setSize(0)
|
||||
d.addObject(fh.file) // make sure the directory has this object in it now
|
||||
return fh, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user