[core] only allow removable drives to be listed

* Our detection code, which is based on the HPUSBFW utility, allows fixed
  drives such as USB HDDs to be listed
* Since Rufus lacks extra precautions for fixed disks, this may result in
  people mistakenly formatting and HDD instead of a flash drive
* Until we have added HDD specific features (support for repartitioning or
  existing partitions, >32GB FAT32, etc.) we prefer playing it safe by
  not listing fixed disks.
* We will re-enable fixed disks when we feel enough safeties are in place
* Also fix an issue where ISO selection could crash if Rufus
  was compiled for Vista and later and update version to rufus-next
This commit is contained in:
Pete Batard 2012-02-24 18:46:02 +00:00
parent e0e974603c
commit 352a796eff
7 changed files with 23 additions and 21 deletions

View file

@ -66,6 +66,7 @@ static BOOLEAN __stdcall FormatExCallback(FILE_SYSTEM_CALLBACK_COMMAND Command,
case FCC_PROGRESS:
percent = (DWORD*)pData;
PrintStatus(0, FALSE, "Formatting: %d%% completed.", *percent);
// uprintf("%d percent completed.\n", *percent);
UpdateProgress(OP_FORMAT, 1.0f * (*percent));
break;
case FCC_STRUCTURE_PROGRESS: // No progress on quick format
@ -667,7 +668,6 @@ DWORD WINAPI FormatThread(LPVOID param)
}
if (IsChecked(IDC_SET_ICON))
SetAutorun(drive_name);
UpdateProgress(OP_DOS, -1.0f);
// Issue another complete remount before we exit, to ensure we're clean
RemountVolume(drive_name[0]);
}