Timeshift can't be disabled if the timeshift disk doesn't support timeshift

Issue #389 resolved
prl created an issue

If the HDD used for timeshift doesn't support timeshift (not in the supported_filesystems list in Screens.Timeshifter.TimeshiftSettings.keySave), setting MENU>Setup>TV>Timeshift settings>Automatically start timeshift after to Disabled doesn't work. If the setting is set to Disabled, and the setting screen saved, the setting is unchanged.

The problem is in Screens.Timeshifter.TimeshiftSettings.keySave. If int(config.timeshift.startdelay.value) <= 0, then it calls config.timeshift.startdelay.setValue(0). config.timeshift.startdelay is a ConfigSelection instance and its values are strings. The call should be config.timeshift.startdelay.setValue("0") (or preferably config.timeshift.startdelay.value = "0").

Reproduction steps

With the timeshift directory set to its default (/media/hdd/timeshift) arrange for /media/hdd to have a filesystem that isn't in the list of filesystems that support timeshift (e.g. NTFS or FAT32). This can be done by replacing the internal HDD with a suitably formatted disk or by connecting a suitably formatted USB drive to a diskless T3.

Restart, navigate to MENU>Setup>TV>Timeshift settings, and set Automatically start timeshift after to Disabled. Then save the setting with GREEN Save. There is no error.

Return to MENU>Setup>TV>Timeshift settings; Automatically start timeshift after is set to its default 10 sec.

Comments (3)

  1. Peter Urbanec

    Fix Bug #389: Timeshift can't be disabled if the timeshift disk doesn't support timeshift

    Calls of

    config.timeshift.startdelay.setValue(0)

    in Screens.Timershift should have a string argument, not an integer, and this means that when this is called, config.timeshift.startdelay s set to its default, not the intended Disabled.

    Changed to

    config.timeshift.startdelay.value = "0"

    → <<cset b9425cbe2bf5>>

  2. Log in to comment