[NetworkBrowser] Wrong mount/unmount logic for enigma2 mounts

Issue #721 resolved
prl created an issue

If the mount type of a network mount is Enigma2 or Enigma2 old format, restarting the GUI when those mount types are active will unmount them. A second restart will restore the mounts.

The same bug will happen if a new mount is added (Enigma2 mounts other than the new one will be unmounted), and then a second one is added (Enigma2 mounts will be remounted),.

The problem is due to the fact that the code in AutoMount.doCheckMountPoint() checks whether the filesystem is already mounted, and queues (but doesn't execute) an unmount command, and then checks whether the filesystem is not mounted and executes a mount command if it isn't mounted. But because the unmount command hasn't run, the filesystem will still be mounted even though it will be unmounted before the mount command would run. So if the filesysyem is mounted and should stay mounted, it will be unmounted, but if it was originally unmounted, and should be mounted, it will be mounted.

Mounts using autofs and fstab are not affected by this bug.

Replication steps

Mount a filesystem using "Mount using" set to Enigma2 (using Enigma2 old format for the test is complicated by Bug #719).

Check that the mount has been made.

Long-POWER>Restart GUI: the filesystem will be unmounted. Long-POWER>Restart GUI: the filesystem will be remounted.

Comments (1)

  1. Log in to comment