From c50c23de4d33dcfafc44a4cc6ab0e3c6c82e844a Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 9 May 2006 21:47:17 +0000 Subject: [PATCH] * src/GrampsDb/_WriteXML.py (write_object): Check whether path is empty before removing leading slash. svn: r6598 --- gramps2/ChangeLog | 2 ++ gramps2/src/GrampsDb/_WriteXML.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 341ee0523..704c53f0c 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,4 +1,6 @@ 2006-05-09 Alex Roitman + * src/GrampsDb/_WriteXML.py (write_object): Check whether path is + empty before removing leading slash. * src/GrampsDb/_WriteGedcom.py: Bring to new API. * src/plugins/ExportVCard.py: Bring to new API. * src/plugins/ExportVCalendar.py: Bring to new API. diff --git a/gramps2/src/GrampsDb/_WriteXML.py b/gramps2/src/GrampsDb/_WriteXML.py index a3c67dae3..56086df57 100644 --- a/gramps2/src/GrampsDb/_WriteXML.py +++ b/gramps2/src/GrampsDb/_WriteXML.py @@ -976,7 +976,7 @@ class XmlWriter: desc_text = '' if self.strip_photos == 1: path = os.path.basename(path) - elif self.strip_photos == 2 and path[0] == '/': + elif self.strip_photos == 2 and (len(path)>0 and path[0]) == '/': path = path[1:] self.g.write('%s\n'