Skip to content

Commit

Permalink
[UsageConfig]
Browse files Browse the repository at this point in the history
* clear legacy config.usage.timeshift_path
  • Loading branch information
jbleyel committed Oct 28, 2024
1 parent 8cccf18 commit 09a2b0b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/python/Components/UsageConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from keyids import KEYIDS
from skin import getcomponentTemplateNames, parameters, domScreens
from Components.config import ConfigBoolean, ConfigClock, ConfigDirectory, ConfigDictionarySet, ConfigFloat, ConfigInteger, ConfigIP, ConfigLocations, ConfigNumber, ConfigSelectionNumber, ConfigPassword, ConfigSequence, ConfigSelection, ConfigSet, ConfigSlider, ConfigSubsection, ConfigText, ConfigYesNo, NoSave, config
from Components.config import ConfigBoolean, ConfigClock, ConfigDirectory, ConfigDictionarySet, ConfigFloat, ConfigInteger, ConfigIP, ConfigLocations, ConfigNumber, ConfigSelectionNumber, ConfigPassword, ConfigSequence, ConfigSelection, ConfigSet, ConfigSlider, ConfigSubsection, ConfigText, ConfigYesNo, NoSave, config, configfile
from Components.Harddisk import harddiskmanager
from Components.International import international
from Components.NimManager import nimmanager
Expand Down Expand Up @@ -2320,6 +2320,7 @@ def setForceToneBurstChanged(configElement):
defaultPath = config.usage.timeshift_path.value
config.usage.timeshift_path.value = config.usage.timeshift_path.default
config.usage.timeshift_path.save()
configfile.save() # This needs to be done once here to reset the legacy value.
config.timeshift.path = ConfigSelection(default=defaultPath, choices=[(defaultPath, defaultPath)])
config.timeshift.path.load()
savedPath = config.timeshift.path.saved_value
Expand Down

0 comments on commit 09a2b0b

Please sign in to comment.