mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-24 19:54:25 -04:00
[misc] pocketful of enhancement and fixes - part 1
* Add a cheat mode for VMWare disk detection * Add a cheat mode to delete the rufus_files directory * Don't attempt a grub2 download in case we couldn't read the version * Don't use a shared message buffer between info and status and also use a more logical handling of low pri/high pri and timeout * Also fix unwanted selection of info text on restore from minimize * Also fix the localization generation and add more messages
This commit is contained in:
parent
c56a1c87de
commit
2e817ae944
11 changed files with 124 additions and 58 deletions
|
@ -499,6 +499,21 @@ static __inline int SHCreateDirectoryExU(HWND hwnd, const char* pszPath, SECURIT
|
|||
return ret;
|
||||
}
|
||||
|
||||
static __inline int SHDeleteDirectoryExU(HWND hwnd, const char* pszPath, FILEOP_FLAGS fFlags)
|
||||
{
|
||||
int ret;
|
||||
// String needs to be double NULL terminated, so we just use the length of the UTF-8 string
|
||||
// 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));
|
||||
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;
|
||||
}
|
||||
|
||||
static __inline BOOL ShellExecuteExU(SHELLEXECUTEINFOA* lpExecInfo)
|
||||
{
|
||||
BOOL ret = FALSE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue