* src/GrampsDb/_WriteXML.py (write_object): Check whether path is

empty before removing leading slash.


svn: r6598
This commit is contained in:
Alex Roitman 2006-05-09 21:47:17 +00:00
parent 82a5be28d6
commit c50c23de4d
2 changed files with 3 additions and 1 deletions

View File

@ -1,4 +1,6 @@
2006-05-09 Alex Roitman <shura@gramps-project.org>
* 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.

View File

@ -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<file src="%s" mime="%s"%s/>\n'