diff --git a/ChangeLog b/ChangeLog index c8f581aee..0e9b71fab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-11-07 Benny Malengier + * src/AddMedia.py: media crash, fix issue #1349, change unicode to Utils + 2007-11-06 Benny Malengier * src/plugins/all_relations.py: english issues * src/Relationship.py: english issues diff --git a/src/AddMedia.py b/src/AddMedia.py index 09c8225c8..17b51c736 100644 --- a/src/AddMedia.py +++ b/src/AddMedia.py @@ -135,8 +135,13 @@ class AddMediaObject(ManagedWindow.ManagedWindow): mobj.set_handle(Utils.create_id()) mobj.set_mime_type(None) else: - filename = unicode(self.file_text.get_filename(), - sys.getfilesystemencoding()) + if self.file_text.get_filename() is None: + msgstr = _("Import failed") + msgstr2 = _("The filename supplied could not be found.") + ErrorDialog(msgstr, msgstr2) + return + + filename = Utils.get_unicode_path(self.file_text.get_filename()) full_file = filename if self.relpath.get_active():