strip off leading directory path if image file is in a subdirectory

svn: r302
This commit is contained in:
Don Allingham 2001-08-07 13:33:46 +00:00
parent 63036b6ee2
commit 4a597b3aad

View File

@ -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(' <img src="%s"' % fix(path) )
g.write(' descrip="%s"' % fix(photo.getDescription()))
proplist = photo.getPropertyList()