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('