mirror of
https://github.com/pbatard/rufus.git
synced 2024-08-14 23:57:05 +00:00
Merge b95e87040b
into 7f82dbf0fc
This commit is contained in:
commit
496369cb4f
1 changed files with 8 additions and 1 deletions
|
@ -1541,10 +1541,17 @@ static BOOL WriteDrive(HANDLE hPhysicalDrive, HANDLE hSourceImage)
|
|||
LastRefresh = 0;
|
||||
|
||||
if (img_report.compression_type != BLED_COMPRESSION_NONE) {
|
||||
int64_t bled_ret;
|
||||
uprintf("Writing Compressed Image...");
|
||||
bled_init(_uprintf, update_progress, &FormatStatus);
|
||||
bled_uncompress_with_handles(hSourceImage, hPhysicalDrive, img_report.compression_type);
|
||||
bled_ret = bled_uncompress_with_handles(hSourceImage, hPhysicalDrive, img_report.compression_type);
|
||||
bled_exit();
|
||||
if (bled_ret < 0 && SCODE_CODE(FormatStatus) != ERROR_CANCELLED) {
|
||||
// Unfortunately, different compression backends return different negative error codes
|
||||
uprintf("Writing compressed image failed: %" PRIi64, bled_ret);
|
||||
FormatStatus = ERROR_SEVERITY_ERROR | FAC(FACILITY_STORAGE) | ERROR_WRITE_FAULT;
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
uprintf(hSourceImage?"Writing Image...":"Zeroing drive...");
|
||||
// Our buffer size must be a multiple of the sector size and *ALIGNED* to the sector size
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue