mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
[core] relax the rule for exclusive write access
* If we can't get a write handle for more than 5 seconds, retry with FILE_SHARE_WRITE
* This is a partial revert of 2f81e4f177
, in order to address #924.
This commit is contained in:
parent
2417ea7409
commit
854620d0ba
2 changed files with 9 additions and 10 deletions
|
@ -57,7 +57,6 @@ const GUID PARTITION_SYSTEM_GUID =
|
||||||
* Globals
|
* Globals
|
||||||
*/
|
*/
|
||||||
RUFUS_DRIVE_INFO SelectedDrive;
|
RUFUS_DRIVE_INFO SelectedDrive;
|
||||||
extern BOOL lock_drive;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following methods get or set the AutoMount setting (which is different from AutoRun)
|
* The following methods get or set the AutoMount setting (which is different from AutoRun)
|
||||||
|
@ -148,10 +147,10 @@ static HANDLE GetHandle(char* Path, BOOL bLockDrive, BOOL bWriteAccess, BOOL bWr
|
||||||
break;
|
break;
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
uprintf("Waiting for access...");
|
uprintf("Waiting for access...");
|
||||||
} else if (!lock_drive && bWriteAccess && !bWriteShare && (i > (2*DRIVE_ACCESS_RETRIES)/3)) {
|
} else if (bWriteAccess && !bWriteShare && (i > DRIVE_ACCESS_RETRIES/3)) {
|
||||||
// If we can't seem to get a hold of the drive for a long time,
|
// If we can't seem to get a hold of the drive for some time,
|
||||||
// and Alt-, is enabled, make a last ditch effort with FILE_SHARE_WRITE...
|
// try to enable FILE_SHARE_WRITE...
|
||||||
uprintf("Can't access %s - Retrying with write sharing enabled...");
|
uprintf("Warning: Could not obtain exclusive rights. Retrying with write sharing enabled...");
|
||||||
bWriteShare = TRUE;
|
bWriteShare = TRUE;
|
||||||
}
|
}
|
||||||
Sleep(DRIVE_ACCESS_TIMEOUT / DRIVE_ACCESS_RETRIES);
|
Sleep(DRIVE_ACCESS_TIMEOUT / DRIVE_ACCESS_RETRIES);
|
||||||
|
|
10
src/rufus.rc
10
src/rufus.rc
|
@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
|
||||||
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
IDD_DIALOG DIALOGEX 12, 12, 242, 376
|
||||||
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
EXSTYLE WS_EX_ACCEPTFILES
|
EXSTYLE WS_EX_ACCEPTFILES
|
||||||
CAPTION "Rufus 2.14.1084"
|
CAPTION "Rufus 2.14.1085"
|
||||||
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
FONT 8, "Segoe UI Symbol", 400, 0, 0x0
|
||||||
BEGIN
|
BEGIN
|
||||||
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8
|
||||||
|
@ -334,8 +334,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,14,1084,0
|
FILEVERSION 2,14,1085,0
|
||||||
PRODUCTVERSION 2,14,1084,0
|
PRODUCTVERSION 2,14,1085,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -352,13 +352,13 @@ BEGIN
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)"
|
||||||
VALUE "FileDescription", "Rufus"
|
VALUE "FileDescription", "Rufus"
|
||||||
VALUE "FileVersion", "2.14.1084"
|
VALUE "FileVersion", "2.14.1085"
|
||||||
VALUE "InternalName", "Rufus"
|
VALUE "InternalName", "Rufus"
|
||||||
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
|
VALUE "LegalCopyright", "© 2011-2017 Pete Batard (GPL v3)"
|
||||||
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html"
|
||||||
VALUE "OriginalFilename", "rufus.exe"
|
VALUE "OriginalFilename", "rufus.exe"
|
||||||
VALUE "ProductName", "Rufus"
|
VALUE "ProductName", "Rufus"
|
||||||
VALUE "ProductVersion", "2.14.1084"
|
VALUE "ProductVersion", "2.14.1085"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Reference in a new issue