encoding shenanigans

This commit is contained in:
minjaesong
2023-05-09 21:40:17 +09:00
parent 831485bc35
commit 3c758ba82f
6 changed files with 42 additions and 5 deletions

View File

@@ -762,7 +762,16 @@ _TVDOS.DRV.FS.DEVTMP.mkFile = (fd) => {
return true
}
_TVDOS.DRV.FS.DEVTMP.remove = (fd) => {
let path = _TVDOS.TMPFS[fd.path]
delete _TVDOS.TMPFS[fd.path]
// delete all the keys starting with _TVDOS.TMPFS[fd.path]
if (_TVDOS.DRV.FS.DEVTMP.isDirectory(fd)) {
Object.keys(_TVDOS.TMPFS).filter(it=>it.startsWith(path)).forEach(childs=>{
delete _TVDOS.TMPFS[childs]
})
}
return true
}
_TVDOS.DRV.FS.DEVTMP.exists = (fd) => (_TVDOS.TMPFS[fd.path] !== undefined)