[VFS] Skip treating NT Device paths root as non-directory.

This fixes cache initialization failure
This commit is contained in:
Gliniak
2026-04-27 20:19:10 +02:00
parent cff0773e00
commit 60f77c3622

View File

@@ -245,7 +245,11 @@ X_STATUS VirtualFileSystem::OpenFile(Entry* root_entry,
}
if (!(entry->attributes() & kFileAttributeDirectory) && is_directory) {
return X_STATUS_NOT_A_DIRECTORY;
// Device root should be treated as a directory, but because we do not
// emulate that correctly for now I will leave this ugly hack.
if (!entry->absolute_path().starts_with("\\Device")) {
return X_STATUS_NOT_A_DIRECTORY;
}
}
// If the entry does not exist on the host then remove the cached entry