mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-28 21:54:15 -04:00
[core] don't clean up partition data before writing a disk image
* This workaround seems to be needed for the upcoming Windows 10 rs2_release (see #883) * Also some minor fixes * Closes #883
This commit is contained in:
parent
f7b839c596
commit
c72aa7be0a
4 changed files with 13 additions and 11 deletions
|
@ -126,7 +126,7 @@ static HANDLE GetHandle(char* Path, BOOL bWriteAccess, BOOL bLockDrive)
|
|||
if (Path == NULL)
|
||||
goto out;
|
||||
hDrive = CreateFileA(Path, GENERIC_READ|(bWriteAccess?GENERIC_WRITE:0),
|
||||
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
FILE_SHARE_READ|(bWriteAccess?FILE_SHARE_WRITE:0), NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if (hDrive == INVALID_HANDLE_VALUE) {
|
||||
uprintf("Could not open drive %s: %s\n", Path, WindowsErrorString());
|
||||
goto out;
|
||||
|
@ -1286,9 +1286,9 @@ BOOL InitializeDisk(HANDLE hDrive)
|
|||
uprintf("Could not refresh drive layout: %s\n", WindowsErrorString());
|
||||
safe_closehandle(hDrive);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue