forked from openlp/openlp
Fix crash if presentation file in the mediamanger was removed bewteen sessions. Fixes bug 1432418.
Fixes: https://launchpad.net/bugs/1432418
This commit is contained in:
parent
affd6f0d85
commit
d74f2c05ff
@ -245,7 +245,8 @@ class PresentationMediaItem(MediaManagerItem):
|
|||||||
doc = self.controllers[cidx].add_document(filepath)
|
doc = self.controllers[cidx].add_document(filepath)
|
||||||
if clean_for_update:
|
if clean_for_update:
|
||||||
thumb_path = doc.get_thumbnail_path(1, True)
|
thumb_path = doc.get_thumbnail_path(1, True)
|
||||||
if not thumb_path or os.path.getmtime(thumb_path) < os.path.getmtime(filepath):
|
if not thumb_path or (os.path.exists(filepath)
|
||||||
|
and os.path.getmtime(thumb_path) < os.path.getmtime(filepath)):
|
||||||
doc.presentation_deleted()
|
doc.presentation_deleted()
|
||||||
else:
|
else:
|
||||||
doc.presentation_deleted()
|
doc.presentation_deleted()
|
||||||
|
Loading…
Reference in New Issue
Block a user