mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-24 19:54:25 -04:00
[togo] Add Windows To Go support - part 2
* Closes #126 * Only supported on Windows 8 or later for now * Also fix MinGW and WDK compilation issues
This commit is contained in:
parent
295650a8b4
commit
032d4413c8
17 changed files with 251 additions and 70 deletions
|
@ -506,9 +506,9 @@ static __inline int SHDeleteDirectoryExU(HWND hwnd, const char* pszPath, FILEOP_
|
|||
// which is always expected to be larger than our UTF-16 one, and add 2 chars for good measure.
|
||||
size_t wpszPath_len = strlen(pszPath) + 2;
|
||||
wchar_t* wpszPath = (wchar_t*)calloc(wpszPath_len, sizeof(wchar_t));
|
||||
SHFILEOPSTRUCTW shfo = { hwnd, FO_DELETE, wpszPath, NULL, fFlags, FALSE, NULL, NULL };
|
||||
utf8_to_wchar_no_alloc(pszPath, wpszPath, wpszPath_len);
|
||||
// FOF_SILENT | FOF_NOERRORUI | FOF_NOCONFIRMATION,
|
||||
SHFILEOPSTRUCTW shfo = { hwnd, FO_DELETE, wpszPath, NULL, fFlags, FALSE, NULL, NULL };
|
||||
ret = SHFileOperationW(&shfo);
|
||||
wfree(pszPath);
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue