You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If a (HostFS) file has been "locked" by macOS, RPCEmu will be unable to delete or rename the file. In addition, if the "locked" file is deleted by macOS, RPCEmu will subsequently be unable to delete the owning directory. Part of this issue appeared in previous versions of RPCEmu, and it is possible that the issue is cross-platform.
To Reproduce
Create a text file in a test directory in HostFS.
Under macOS, navigate to that directory (in the "hostfs" folder) and lock the file.
Back in RPCEmu, try to delete or rename the file.
Under macOS, delete the locked file.
Back in RPCEmu, try to delete the owning directory.
System information
Host machine: MacBook Pro 13-inch (2017 version)
rpcemu-macos release: 0.9.1-pp3 (recompiler or interpreter)
macOS version: Mojave 10.14.5
Emulated processor: StrongARM Risc PC
RISC OS versions: 3.7, 5.24 or 5.27(06-June-2019 build)
Additional context
If an attempt is made to delete the owning directory while a file has been locked by macOS, Filer will get stuck in a loop trying to delete the "locked" file. Click on "Abort" to escape.
RPCEmu 0.8.14-caliston-dev1 also suffered from the "un-deletable file" issue, but was able to delete the directory after the locked file was deleted from macOS.
At 0.9.1-pp3, the owning directory can be deleted if the file is unlocked, but not if the file is deleted by macOS.
The text was updated successfully, but these errors were encountered:
I've had a quick look at this, and the HostFS code that performs file deletes doesn't return an error back to RISC OS if the delete fails (see "hostfs_file_6_delete" in "hostfs.c"). It does log the error to the console log (which you can see if you're debugging in XCode).
It's also not checking whether the file is locked (see https://stackoverflow.com/a/13119512 for how to do this) - it should be checking this and returning a "file locked" error to RISC OS before attempting the delete. I bodged this into the source and it does (sort of) work, though you don't get a particularly informative error message from RISC OS.
Another issue is that HostFS doesn't seem to support locking files, at least that I can see.
Describe the bug
If a (HostFS) file has been "locked" by macOS, RPCEmu will be unable to delete or rename the file. In addition, if the "locked" file is deleted by macOS, RPCEmu will subsequently be unable to delete the owning directory. Part of this issue appeared in previous versions of RPCEmu, and it is possible that the issue is cross-platform.
To Reproduce
System information
Additional context
If an attempt is made to delete the owning directory while a file has been locked by macOS, Filer will get stuck in a loop trying to delete the "locked" file. Click on "Abort" to escape.
RPCEmu 0.8.14-caliston-dev1 also suffered from the "un-deletable file" issue, but was able to delete the directory after the locked file was deleted from macOS.
At 0.9.1-pp3, the owning directory can be deleted if the file is unlocked, but not if the file is deleted by macOS.
The text was updated successfully, but these errors were encountered: