tweak _Device.available for existing partitions

This commit is contained in:
Michael Hudson-Doyle 2019-05-30 14:51:04 +12:00
parent 9ef3ce19a1
commit 6fb185647b
1 changed files with 2 additions and 1 deletions

View File

@ -533,7 +533,8 @@ class _Device(_Formattable, ABC):
if self._fs is not None: if self._fs is not None:
return self._fs._available() return self._fs._available()
if self.free_for_partitions > 0: if self.free_for_partitions > 0:
return True if not self._has_preexisting_partition():
return True
for p in self._partitions: for p in self._partitions:
if p.available(): if p.available():
return True return True