Исправлено обновление меню LiveHDD

3.4.3.2
parent 3f7e902398
commit 32e42c9c16

@ -1498,6 +1498,9 @@ class VariableClBuilderLivemenuPath(Variable):
root_type_ext = self.Get('os_root_type_ext')
if not value and root_type_ext in RootType.IsoScanGrub:
raise VariableError(_("Please specify images directory"))
if (not path.exists(value) or value.startswith('/dev') or
not path.isdir(value)) and value:
raise VariableError(_("Please specify directory"))
if root_type_ext in RootType.Grubable:
if root_type_ext in RootType.IsoScanGrub:
grub_rep = self.get_isoscan_grub_repository()
@ -1505,14 +1508,15 @@ class VariableClBuilderLivemenuPath(Variable):
raise VariableError(
_("You cannot change images directory"))
else:
if (not path.exists(value) or value.startswith('/dev') or
not path.isdir(value)) and value:
raise VariableError(_("Please specify directory"))
if value:
gc = GrubCommand()
if not gc.is_available(value):
raise VariableError(
_("%s is unavailable for grub") % value)
else:
grub_file = path.join(value, "grub.cfg")
if not path.exists(grub_file):
raise VariableError(_("Please specify LiveHDD directory"))
def set(self, value):
if value == "none":

Loading…
Cancel
Save