strip off leading directory path if image file is in a subdirectory
svn: r302
This commit is contained in:
parent
63036b6ee2
commit
4a597b3aad
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user