vfs: add open files to directories
This commit is contained in:
parent
61b6159a05
commit
eab55ce882
2 changed files with 2 additions and 0 deletions
|
@ -104,6 +104,7 @@ func (fh *RWFileHandle) openPending(truncate bool) (err error) {
|
||||||
fh.File = fd
|
fh.File = fd
|
||||||
fh.opened = true
|
fh.opened = true
|
||||||
fh.d.vfs.cache.open(fh.osPath)
|
fh.d.vfs.cache.open(fh.osPath)
|
||||||
|
fh.d.addObject(fh.file) // make sure the directory has this object in it now
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,7 @@ func newWriteFileHandle(d *Dir, f *File, remote string) (*WriteFileHandle, error
|
||||||
}()
|
}()
|
||||||
fh.file.addWriter(fh)
|
fh.file.addWriter(fh)
|
||||||
fh.file.setSize(0)
|
fh.file.setSize(0)
|
||||||
|
d.addObject(fh.file) // make sure the directory has this object in it now
|
||||||
return fh, nil
|
return fh, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue