-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix installer download when temp. path is not set #18
Conversation
Use a fallback TMP or TEMP and then use the current directory. Fix notepad-plus-plus#16
@donho I think this is pretty important to fix because:
https://stackoverflow.com/questions/48568707/getenv-function-may-be-unsafe-really |
It's good. But I need a real crash to validate this PR. |
@donho ok, try this:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Find a suitable solution for Notepad++ installed in Program Files
.
Use fallback directories: UserProfile, LocalAppData, ProgramData.
@donho Do you consider merging this before RC? |
I am providing a link to my specification of the error description #16 (comment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove the unnecessary function. Don't copy the file into the root of user space and take consideration of empty string to terminate gracefully. Do it as simple as possible.
@mere-human |
@donho |
Please do it in the same PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Win32 API instead of COM, or remove the following part completely.
LPWSTR path = nullptr;
const HRESULT hr = ::SHGetKnownFolderPath(FOLDERID_Downloads, 0, nullptr, &path);
if (SUCCEEDED(hr))
{
std::wstring result = path;
CoTaskMemFree(path);
return result;
}
Sorry, I forgot about ARM64 build. |
Shall we remove |
The request is quite clear:
I don't want COM in WinGup project. |
It's already in x64 build. |
Leave it please. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't modify project file.
Thank you @mere-human |
Use a fallback TMP or TEMP and then use the current directory.
Fix #16