mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Return error if trying to create images with negative or overflow sectors on formats that don't support them.
This commit is contained in:
@@ -58,6 +58,20 @@ public sealed partial class DriDiskCopy
|
||||
return false;
|
||||
}
|
||||
|
||||
if(negativeSectors != 0)
|
||||
{
|
||||
ErrorMessage = Localization.Negative_sectors_are_not_supported;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(overflowSectors != 0)
|
||||
{
|
||||
ErrorMessage = Localization.Overflow_sectors_are_not_supported;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if(sectors > ushort.MaxValue)
|
||||
{
|
||||
ErrorMessage = Localization.Too_many_sectors;
|
||||
|
||||
Reference in New Issue
Block a user