mirror of
https://github.com/ONLYOFFICE/desktop-apps.git
synced 2026-04-07 14:09:22 +08:00
[win] updatesvc: debug tempPath
This commit is contained in:
@ -515,10 +515,12 @@ namespace NS_File
|
||||
wstring tempPath()
|
||||
{
|
||||
if (NS_Utils::isRunAsApp()) {
|
||||
WCHAR buff[MAX_PATH] = {0};
|
||||
DWORD res = ::GetTempPath(MAX_PATH, buff);
|
||||
if (res != 0)
|
||||
return fromNativeSeparators(parentPath(buff));
|
||||
WCHAR buff[MAX_PATH + 1] = {0};
|
||||
DWORD res = ::GetTempPath(MAX_PATH + 1, buff);
|
||||
if (res != 0) {
|
||||
buff[res - 1] = '\0';
|
||||
return fromNativeSeparators(buff);
|
||||
}
|
||||
NS_Logger::WriteLog(ADVANCED_ERROR_MESSAGE);
|
||||
return fallbackTempPath();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user