From 82f8074e7db8462bf68516c54ba9c8ec2bc3dfce Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 8 Aug 2001 00:28:51 +0000 Subject: [PATCH] Fixed photo paths svn: r311 --- gramps/src/WriteXML.py | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/gramps/src/WriteXML.py b/gramps/src/WriteXML.py index 80eb181ee..ae4c175e6 100644 --- a/gramps/src/WriteXML.py +++ b/gramps/src/WriteXML.py @@ -379,8 +379,10 @@ def exportData(database, filename, callback): for photo in family.getPhotoList(): path = photo.getPath() - if os.path.dirname(path) == fileroot: - path = os.path.basename(path) + l = len(fileroot) + if len(path) >= l: + if fileroot == path[0:l]: + path = path[l+1:] g.write(" = l: + if fileroot == path[0:l]: + path = path[l+1:] + g.write(" \n") g.write(" \n") g.write(" \n")