|
|
|
@ -636,10 +636,13 @@ class RoundableVolumesBuilder(VolumesBuilder):
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
def refined_size(self, size):
|
|
|
|
|
if size is VolumesBuilder.SizeAllFree and self.minimal:
|
|
|
|
|
if (self.minimal > self.free_size and
|
|
|
|
|
not self.is_roundable_size(self.minimal)):
|
|
|
|
|
return self.minimal
|
|
|
|
|
if (size is VolumesBuilder.SizeAllFree or size < 0) and self.minimal:
|
|
|
|
|
check_size = self.minimal
|
|
|
|
|
if size is not VolumesBuilder.SizeAllFree:
|
|
|
|
|
check_size -= size
|
|
|
|
|
if (check_size > self.free_size and
|
|
|
|
|
not self.is_roundable_size(check_size)):
|
|
|
|
|
return check_size
|
|
|
|
|
if self.last_partition:
|
|
|
|
|
if self.is_roundable_size(size):
|
|
|
|
|
size = VolumesBuilder.SizeAllFree
|
|
|
|
|