From: acid-burn Date: Mon, 13 Dec 2010 11:39:41 +0000 (+0100) Subject: SoftwareManager/plugin.py: allow autofs volumes to be selectable as backup location... X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=7ad025f87116448816a7531cfdac8bb1e0cffb0b SoftwareManager/plugin.py: allow autofs volumes to be selectable as backup location. fixes #629 --- diff --git a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py index e1f3e1d..904fbb3 100755 --- a/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py +++ b/lib/python/Plugins/SystemPlugins/SoftwareManager/plugin.py @@ -261,9 +261,6 @@ class UpdatePluginMenu(Screen): for x in parts: if not access(x[1], F_OK|R_OK|W_OK) or x[1] == '/': parts.remove(x) - for x in parts: - if x[1].startswith('/autofs/'): - parts.remove(x) if len(parts): self.session.openWithCallback(self.backuplocation_choosen, ChoiceBox, title = _("Please select medium to use as backup location"), list = parts) elif (currentEntry == "backupfiles"): @@ -278,14 +275,20 @@ class UpdatePluginMenu(Screen): def backupfiles_choosen(self, ret): self.backupdirs = ' '.join( config.plugins.configurationbackup.backupdirs.value ) - + config.plugins.configurationbackup.backupdirs.save() + config.plugins.configurationbackup.save() + config.save() + def backuplocation_choosen(self, option): + oldpath = config.plugins.configurationbackup.backuplocation.getValue() if option is not None: config.plugins.configurationbackup.backuplocation.value = str(option[1]) config.plugins.configurationbackup.backuplocation.save() config.plugins.configurationbackup.save() config.save() - self.createBackupfolders() + newpath = config.plugins.configurationbackup.backuplocation.getValue() + if newpath != oldpath: + self.createBackupfolders() def runUpgrade(self, result): if result: