From 60f77c36228cc5f1dc3af0c0b400d19db43a80f0 Mon Sep 17 00:00:00 2001 From: Gliniak <153369+Gliniak@users.noreply.github.com> Date: Mon, 27 Apr 2026 20:19:10 +0200 Subject: [PATCH] [VFS] Skip treating NT Device paths root as non-directory. This fixes cache initialization failure --- src/xenia/vfs/virtual_file_system.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/xenia/vfs/virtual_file_system.cc b/src/xenia/vfs/virtual_file_system.cc index 248e9a9a2..08d048faf 100644 --- a/src/xenia/vfs/virtual_file_system.cc +++ b/src/xenia/vfs/virtual_file_system.cc @@ -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