From 4a597b3aad38d91abae9e4bca3aece03f5814d2a Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 7 Aug 2001 13:33:46 +0000 Subject: [PATCH] strip off leading directory path if image file is in a subdirectory svn: r302 --- src/WriteXML.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/WriteXML.py b/src/WriteXML.py index 11a63cfaf..8996b4d90 100644 --- a/src/WriteXML.py +++ b/src/WriteXML.py @@ -301,8 +301,11 @@ def exportData(database, filename, callback): for photo in person.getPhotoList(): path = photo.getPath() - if os.path.dirname(path) == fileroot: - path = os.path.basename(path) + l = len(fullpath) + if len(path) >= l: + if fullpath == path[0:l]: + path = path[l+1:] + print path g.write('