Browse Source

GUI: Ensure file path for `SHFileOperation` is ended with 2 zeros

pull/886/head
Valentin Radu 4 years ago
parent
commit
8b7ea20861
  1. 3
      ExplorerPatcher/GUI.c

3
ExplorerPatcher/GUI.c

@ -19,7 +19,8 @@ int GUI_DeleteWeatherFolder() @@ -19,7 +19,8 @@ int GUI_DeleteWeatherFolder()
WCHAR wszWorkFolder[MAX_PATH + 1];
ZeroMemory(wszWorkFolder, (MAX_PATH + 1) * sizeof(WCHAR));
SHGetFolderPathW(NULL, CSIDL_APPDATA, NULL, SHGFP_TYPE_CURRENT, wszWorkFolder);
wcscat_s(wszWorkFolder, MAX_PATH, L"\\ExplorerPatcher\\ep_weather_host");
wcscat_s(wszWorkFolder, MAX_PATH + 1, L"\\ExplorerPatcher\\ep_weather_host");
wszWorkFolder[wcslen(wszWorkFolder) + 1] = 0;
SHFILEOPSTRUCTW op;
ZeroMemory(&op, sizeof(SHFILEOPSTRUCTW));
op.wFunc = FO_DELETE;

Loading…
Cancel
Save