mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-30 14:35:21 -04:00
[iso] update the handling of failure of autorun.inf creation
* Commit 4c5adf092e
moved us away from using CreateFile()
when extracting a file on the target media, and as such the error code returned when
failing to create an 'autorun.inf' due to a security solution has shifted.
* Make sure we handle the new error and don't bail out on 'autorun.inf' creation.
* Also update the actual name of the RtlDosPathNameToNtPathNameXXX function we use.
* Closes #1496
This commit is contained in:
parent
ffa573ba5c
commit
b19f47f9b8
3 changed files with 12 additions and 10 deletions
|
@ -501,7 +501,8 @@ static int udf_extract_files(udf_t *p_udf, udf_dirent_t *p_udf_dirent, const cha
|
|||
if (file_handle == INVALID_HANDLE_VALUE) {
|
||||
err = GetLastError();
|
||||
uprintf(" Unable to create file: %s", WindowsErrorString());
|
||||
if ((err == ERROR_ACCESS_DENIED) && (safe_strcmp(&psz_sanpath[3], autorun_name) == 0))
|
||||
if (((err == ERROR_ACCESS_DENIED) || (err == ERROR_INVALID_HANDLE)) &&
|
||||
(safe_strcmp(&psz_sanpath[3], autorun_name) == 0))
|
||||
uprintf(stupid_antivirus);
|
||||
else
|
||||
goto out;
|
||||
|
@ -652,7 +653,8 @@ static int iso_extract_files(iso9660_t* p_iso, const char *psz_path)
|
|||
if (file_handle == INVALID_HANDLE_VALUE) {
|
||||
err = GetLastError();
|
||||
uprintf(" Unable to create file: %s", WindowsErrorString());
|
||||
if ((err == ERROR_ACCESS_DENIED) && (safe_strcmp(&psz_sanpath[3], autorun_name) == 0))
|
||||
if (((err == ERROR_ACCESS_DENIED) || (err == ERROR_INVALID_HANDLE)) &&
|
||||
(safe_strcmp(&psz_sanpath[3], autorun_name) == 0))
|
||||
uprintf(stupid_antivirus);
|
||||
else
|
||||
goto out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue