From e89012127dc820c7c017713d791664266ce311c0 Mon Sep 17 00:00:00 2001 From: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Sat, 14 Dec 2024 12:59:58 +0300 Subject: [PATCH] Fix directory iteration resolving symlinks. --- UnleashedRecomp/kernel/io/file_system.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UnleashedRecomp/kernel/io/file_system.cpp b/UnleashedRecomp/kernel/io/file_system.cpp index 53bf8272..8c668806 100644 --- a/UnleashedRecomp/kernel/io/file_system.cpp +++ b/UnleashedRecomp/kernel/io/file_system.cpp @@ -26,7 +26,7 @@ struct FindHandle else if (iterator->is_regular_file()) lpFindFileData->dwFileAttributes = ByteSwap(FILE_ATTRIBUTE_NORMAL); - std::u8string pathU8Str = std::filesystem::relative(iterator->path(), searchPath).u8string(); + std::u8string pathU8Str = iterator->path().lexically_relative(searchPath).u8string(); uint64_t fileSize = iterator->file_size(); strncpy(lpFindFileData->cFileName, (const char *)(pathU8Str.c_str()), sizeof(lpFindFileData->cFileName)); lpFindFileData->nFileSizeLow = ByteSwap(uint32_t(fileSize >> 32U));