[core] improve handling of DD images and formatting task order

* Add logic to mount/remount a DD image if it contains a partition we can handle
* Clear GPT structures before copying DD image in case it doesn't overwrites them
* Add a call to refresh the drive layout after copying a DD image
* Move the unlocking of logical drive further down. This may help with the
  infamous "device in use by another process" error.
This commit is contained in:
Pete Batard 2014-08-07 01:45:46 +01:00
parent f6ab32c95d
commit 79a871be63
6 changed files with 99 additions and 60 deletions

View file

@ -380,7 +380,7 @@ static BOOL SetDriveInfo(int ComboIndex)
memset(&SelectedDrive, 0, sizeof(SelectedDrive));
SelectedDrive.DeviceNumber = (DWORD)ComboBox_GetItemData(hDeviceList, ComboIndex);
SelectedDrive.nPartitions = GetDrivePartitionData(SelectedDrive.DeviceNumber, fs_type, sizeof(fs_type));
GetDrivePartitionData(SelectedDrive.DeviceNumber, fs_type, sizeof(fs_type), FALSE);
if (!DefineClusterSizes()) {
uprintf("No file system is selectable for this drive\n");