Add a check before the conversion path

This commit is contained in:
66hh
2025-12-27 16:56:48 +08:00
parent ecc00216d6
commit 98393c03d2

View File

@@ -1014,6 +1014,12 @@ namespace syscalls
std::error_code ec{};
const windows_path path = f.name;
if (!path.is_absolute())
{
return STATUS_OBJECT_NAME_NOT_FOUND;
}
const bool is_directory = std::filesystem::is_directory(c.win_emu.file_sys.translate(path), ec);
if (is_directory || create_options & FILE_DIRECTORY_FILE)