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():
|
for photo in person.getPhotoList():
|
||||||
path = photo.getPath()
|
path = photo.getPath()
|
||||||
if os.path.dirname(path) == fileroot:
|
l = len(fullpath)
|
||||||
path = os.path.basename(path)
|
if len(path) >= l:
|
||||||
|
if fullpath == path[0:l]:
|
||||||
|
path = path[l+1:]
|
||||||
|
print path
|
||||||
g.write(' <img src="%s"' % fix(path) )
|
g.write(' <img src="%s"' % fix(path) )
|
||||||
g.write(' descrip="%s"' % fix(photo.getDescription()))
|
g.write(' descrip="%s"' % fix(photo.getDescription()))
|
||||||
proplist = photo.getPropertyList()
|
proplist = photo.getPropertyList()
|
||||||
|
Loading…
Reference in New Issue
Block a user