mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-31 14:58:26 -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
|
@ -450,7 +450,7 @@ BOOL FileIO(BOOL save, char* path, char** buffer, DWORD* size)
|
|||
*buffer = NULL;
|
||||
}
|
||||
handle = CreateFileU(path, save?GENERIC_WRITE:GENERIC_READ, FILE_SHARE_READ,
|
||||
ps, save?CREATE_ALWAYS:OPEN_EXISTING, 0, NULL);
|
||||
ps, save?CREATE_ALWAYS:OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if (handle == INVALID_HANDLE_VALUE) {
|
||||
uprintf("Could not %s file '%s'\n", save?"create":"open", path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue