We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d6a1e01 commit 9f1dfb6Copy full SHA for 9f1dfb6
system/lib/wasmfs/syscalls.cpp
@@ -884,16 +884,16 @@ int wasmfs_unmount(const char* path) {
884
return -EBUSY;
885
}
886
887
- if (auto dir = file->dynCast<Directory>()) {
888
- if (parent->getBackend() == dir->getBackend()) {
889
- // The child is not a valid mountpoint.
890
- return -EINVAL;
891
- }
892
- } else {
+ if (!file->dynCast<Directory>()) {
893
// A normal file or symlink.
894
return -ENOTDIR;
895
896
+ if (parent->getBackend() == file->getBackend()) {
+ // The child is not a valid mountpoint.
+ return -EINVAL;
+ }
+
897
// Input is valid, perform the unlink.
898
return lockedParent.removeChild(childName);
899
0 commit comments