Skip to content

Commit

Permalink
[win] online-installer: debug tempPath
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplestStudio committed Sep 30, 2024
1 parent c92041c commit c2bf650
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions win-linux/extras/online-installer/src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,13 @@ namespace NS_File

wstring tempPath()
{
TCHAR buff[MAX_PATH] = {0};
DWORD res = ::GetTempPath(MAX_PATH, buff);
return (res != 0) ? fromNativeSeparators(parentPath(buff)) : _T("");
TCHAR buff[MAX_PATH + 1] = {0};
DWORD res = ::GetTempPath(MAX_PATH + 1, buff);
if (res != 0) {
buff[res - 1] = '\0';
return fromNativeSeparators(buff);
}
return _T("");
}

wstring appPath()
Expand Down

0 comments on commit c2bf650

Please sign in to comment.