mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-21 18:35:26 -04:00
[core] avoid the use of FILE_SHARE_WRITE
* Not having FILE_SHARE_WRITE on a disk or volume handle helps prevent spurious accesses from the OS or other apps while we are repartitioning/refomatting.
This commit is contained in:
parent
c877284d2a
commit
2f81e4f177
11 changed files with 50 additions and 31 deletions
|
@ -413,7 +413,7 @@ BOOL WimExtractFile_API(const char* image, int index, const char* src, const cha
|
|||
uprintf(" Could not access WIM info: %s", WindowsErrorString());
|
||||
goto out;
|
||||
}
|
||||
hFile = CreateFileW(wdst, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||
hFile = CreateFileW(wdst, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ,
|
||||
NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
if ((hFile == INVALID_HANDLE_VALUE) || (!WriteFile(hFile, wim_info, dw, &dw, NULL))) {
|
||||
uprintf(" Could not extract file: %s", WindowsErrorString());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue