mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-20 18:05:21 -04:00
[ui] increase projected size to prevent persistence overflow
* If users set the persistent size to max, we may run into a situation where projected size (which is always a rough estimation) is too low. * When persistence is in use, we increase the projected size by 10%, to ensure that the above scenario cannot happen. * Also work around potential issues with Windows APIs when the application is launched from the root of a drive.
This commit is contained in:
parent
9d7e96e293
commit
4f97cdfdc3
5 changed files with 20 additions and 10 deletions
2
src/ui.c
2
src/ui.c
|
@ -726,7 +726,7 @@ void SetPersistenceSize(void)
|
|||
uint64_t max = 0, pos = 0;
|
||||
|
||||
if (ComboBox_GetCurSel(hDeviceList) >= 0) {
|
||||
max = SelectedDrive.DiskSize - img_report.projected_size;
|
||||
max = SelectedDrive.DiskSize - PERCENTAGE(PROJECTED_SIZE_RATIO, img_report.projected_size);
|
||||
persistence_size = min(persistence_size, max);
|
||||
pos = persistence_size;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue