1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed BfpFile_GetActualPath

This commit is contained in:
Brian Fiete 2020-04-28 15:51:22 -07:00
parent 9210346853
commit 4479af6df4

View file

@ -3260,10 +3260,14 @@ BFP_EXPORT void BFP_CALLTYPE BfpFile_GetActualPath(const char* inPathC, char* ou
subName[j] = DIR_SEP_CHAR;
info.szDisplayName[0] = 0;
int32 size = (int32)sizeof(SHFILEINFOW);
if (SHGetFileInfoW(UTF8Decode(subName).c_str(), 0, &info, (int32)sizeof(SHFILEINFOW), SHGFI_DISPLAYNAME))
WIN32_FIND_DATAW findData;
HANDLE handleVal = FindFirstFileW(UTF8Decode(subName).c_str(), &findData);
if (handleVal != INVALID_HANDLE_VALUE)
{
outPath.Append(UTF8Encode(info.szDisplayName));
}
outPath.Append(UTF8Encode(findData.cFileName));
FindClose(handleVal);
}
else
{
// most likely file does not exist.