From 0a3b72df34a4b77ed07ef6f1de6653f4156249d6 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 --- ChangeLog | 2 ++ src/GrampsDb/_WriteXML.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 341ee0523..704c53f0c 100644 --- a/ChangeLog +++ b/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/src/GrampsDb/_WriteXML.py b/src/GrampsDb/_WriteXML.py index a3c67dae3..56086df57 100644 --- a/src/GrampsDb/_WriteXML.py +++ b/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'