From 5800f46518b75007720cb39c1f8d615866635557 Mon Sep 17 00:00:00 2001 From: Tim G L Lyons Date: Sat, 11 Feb 2012 18:34:52 +0000 Subject: [PATCH] 0003553: Import media files from GEDCOM (part fix). 0005456: Default log level after installation results in disk being filled on import (part fix). Don't give error messages if the imported media file is an http URL (instead of a local file). Note that the double slash in 'http://" is still stored as a single slash. svn: r18862 --- src/plugins/lib/libgedcom.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/plugins/lib/libgedcom.py b/src/plugins/lib/libgedcom.py index 4e5055b1d..f8d430e74 100644 --- a/src/plugins/lib/libgedcom.py +++ b/src/plugins/lib/libgedcom.py @@ -6638,10 +6638,15 @@ class GedcomParser(UpdateCallback): url.set_type(gen.lib.UrlType.WEB_HOME) obj.add_url(url) else: - (valid, path) = self.__find_file(filename, self.dir_path) - if not valid: - self.__add_msg(_("Could not import %s") % filename) - path = filename.replace('\\', os.path.sep) + # to allow import of references to URLs (especially for import from + # geni.com), do not try to find the files if they are blatently URLs + if filename[0:7] == "http://" or filename[0:8] == "https://": + path = filename + else: + (valid, path) = self.__find_file(filename, self.dir_path) + if not valid: + self.__add_msg(_("Could not import %s") % filename) + path = filename.replace('\\', os.path.sep) photo_handle = self.media_map.get(path) if photo_handle is None: photo = gen.lib.MediaObject()