Opened 14 years ago

Closed 14 years ago

#3837 closed defect (fixed)

MythGallery does not check if call to mount() failed

Reported by: anonymous Owned by: Isaac Richards
Priority: minor Milestone: 0.21
Component: mythgallery Version: head
Severity: medium Keywords:
Cc: Ticket locked: no


IconView::SetupMediaMonitor?() calls m_currDevice->mount() but doesn't check to see if it succeeds or not. It then tries to load the directory m_currDevice->getMountPath() which in the case of an empty string resolves to $HOME under Unix. This is the cause of the problem that I reported in ticket #3815. The attached patch fixes it.

The reason why I saw the bug and noone else did is because I didn't have an entry for my cdrom in /etc/fstab which caused the call to mount() would fail.

Attachments (1)

mythgallery-mount-fail.patch (3.4 KB) - added by dburr@… 14 years ago.
Check the return value of the call to mount()

Download all attachments as: .zip

Change History (3)

Changed 14 years ago by dburr@…

Check the return value of the call to mount()

comment:1 Changed 14 years ago by Daniel Burr

Upon further reflection I think that there should probably be a "Failed to mount '%1', defaulting to GalleryDir?" popup in there as well or at least a VB_VERBOSE message. Otherwise the user will be left scratching their head as to why they are seeing GalleryDir? when they expected to see the inserted media.

comment:2 Changed 14 years ago by paulh

Resolution: fixed
Status: newclosed

(In [14240]) Check that a media device was actually mounted properly before trying to display it in MythGallery.

Warn the user if the mount failed.

Fix a bug in 'Escape' key handling which was sometimes allowing a user to navigate up past the gallery start directory with no way to exit out.

Fixes #3837.

Note: See TracTickets for help on using tickets.