(Windows) Fixed an issue where symlinking media directories would crash the application.

This commit is contained in:
Leon Styhre 2022-05-07 12:16:31 +02:00
parent ca86260ef0
commit 9df3436d82

View file

@ -630,7 +630,7 @@ namespace Utils
if (GetFinalPathNameByHandleW(hFile, const_cast<LPWSTR>(resolvedW.data()), if (GetFinalPathNameByHandleW(hFile, const_cast<LPWSTR>(resolvedW.data()),
static_cast<DWORD>(resolvedW.size()), static_cast<DWORD>(resolvedW.size()),
FILE_NAME_NORMALIZED) > 0) { FILE_NAME_NORMALIZED) > 0) {
resolvedW.resize(resolvedW.size() - 1); resolvedW.resize(resolvedW.size() - 2);
resolved = getGenericPath(Utils::String::wideStringToString(resolvedW)); resolved = getGenericPath(Utils::String::wideStringToString(resolvedW));
} }
CloseHandle(hFile); CloseHandle(hFile);