From a05a72b8eaff6ec65bac92b23bd4d49a2182c3b7 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 11 Sep 2006 15:38:59 +0000 Subject: [PATCH] 2006-09-11 Don Allingham * src/GrampsDb/_ReadXML.py: don't assume that os.path.sep is the first element of an absolute path. Many not be true on some legacy operating systems. svn: r7312 --- gramps2/ChangeLog | 5 +++++ gramps2/src/GrampsDb/_ReadXML.py | 4 ++-- gramps2/src/const.py.in | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 8f570beec..d73bc666b 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2006-09-11 Don Allingham + * src/GrampsDb/_ReadXML.py: don't assume that os.path.sep is the + first element of an absolute path. Many not be true on some legacy + operating systems. + 2006-09-10 Don Allingham * src/DisplayTabls/_PersonEmbedList.py: enable dnd with people for associations diff --git a/gramps2/src/GrampsDb/_ReadXML.py b/gramps2/src/GrampsDb/_ReadXML.py index d6376744b..aa9bc9f1c 100644 --- a/gramps2/src/GrampsDb/_ReadXML.py +++ b/gramps2/src/GrampsDb/_ReadXML.py @@ -1000,9 +1000,9 @@ class GrampsParser(UpdateCallback): def start_file(self,attrs): self.object.mime = attrs['mime'] self.object.desc = attrs['description'] - src = attrs["src"] + drive,src = os.path.splitdrive(attrs["src"]) if src: - if src[0] != os.path.sep: + if not drive and src[0] != os.path.sep: fullpath = os.path.abspath(self.filename) src = os.path.dirname(fullpath) + os.path.sep + src self.object.path = src diff --git a/gramps2/src/const.py.in b/gramps2/src/const.py.in index dbf5352cb..4ef789628 100644 --- a/gramps2/src/const.py.in +++ b/gramps2/src/const.py.in @@ -44,7 +44,7 @@ url_bugtracker = "http://bugs.gramps-project.org/bug_report_advanced_page.php" # Mime Types # #------------------------------------------------------------------------- -app_gramps = "application/x-gramps" +app_gramps = ("application/x-gramps", "x-extension-grdb") app_gramps_xml = "application/x-gramps-xml" app_gedcom = "application/x-gedcom" app_gramps_package = "application/x-gramps-package"