From fd3ca0348f4cb6bd8708fa1adaa42815f0c4a579 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Tue, 27 May 2014 15:04:23 +0100 Subject: [PATCH] 7712: Use full path for file existence check --- gramps/gui/editors/editmedia.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/gui/editors/editmedia.py b/gramps/gui/editors/editmedia.py index 23ce02a27..10c27724d 100644 --- a/gramps/gui/editors/editmedia.py +++ b/gramps/gui/editors/editmedia.py @@ -295,7 +295,8 @@ class EditMedia(EditPrimary): return path = conv_to_unicode(self.file_path.get_text()) - if os.path.isfile(path): + full_path = media_path_full(self.db, path) + if os.path.isfile(full_path): self.determine_mime() else: msg1 = _("There is no media matching the current path value!") @@ -307,7 +308,7 @@ class EditMedia(EditPrimary): self.ok_button.set_sensitive(True) return - self.obj.set_path(conv_to_unicode(path)) + self.obj.set_path(path) with DbTxn('', self.db) as trans: if not self.obj.get_handle():