[VFS] Skip treating NT Device paths root as non-directory.
This fixes cache initialization failure
This commit is contained in:
@@ -245,7 +245,11 @@ X_STATUS VirtualFileSystem::OpenFile(Entry* root_entry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(entry->attributes() & kFileAttributeDirectory) && is_directory) {
|
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
|
// If the entry does not exist on the host then remove the cached entry
|
||||||
|
|||||||
Reference in New Issue
Block a user