mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-28 21:54:15 -04:00
[core] ensure AutoMount is enabled while the app is running
* Having AutoMount disabled when a Fixed drive is being used can result in a failure during formatting (issue #386). * Also set explicit FILE_ATTRIBUTE_NORMAL flag an normalize CreateFile usage * Closes #386
This commit is contained in:
parent
c6fee8709e
commit
d46342c16c
10 changed files with 98 additions and 26 deletions
|
@ -101,7 +101,7 @@ static BOOL SaveIcon(const char* filename)
|
|||
icondir = (GRPICONDIR*)GetResource(hMainInstance, MAKEINTRESOURCEA(IDI_ICON), _RT_GROUP_ICON, "icon", &res_size, FALSE);
|
||||
|
||||
hFile = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE,
|
||||
NULL, CREATE_NEW, 0, 0);
|
||||
NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (hFile == INVALID_HANDLE_VALUE) {
|
||||
uprintf("Unable to create icon '%s': %s.\n", filename, WindowsErrorString());
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue