sys_fs_unlink: add CELL_EISDIR check

This commit is contained in:
Nekotekina
2019-04-12 12:24:36 +03:00
parent f40320bcae
commit 0d415407c7
+5
View File
@@ -852,6 +852,11 @@ error_code sys_fs_unlink(vm::cptr<char> path)
return {CELL_ENOTMOUNTED, path}; return {CELL_ENOTMOUNTED, path};
} }
if (fs::is_dir(local_path))
{
return {CELL_EISDIR, path};
}
if (!vfs::host::unlink(local_path)) if (!vfs::host::unlink(local_path))
{ {
switch (auto error = fs::g_tls_error) switch (auto error = fs::g_tls_error)