Fixed path stripping in WriteXML
svn: r474
This commit is contained in:
parent
f45b6818b6
commit
014ea4f3a1
@ -34,6 +34,7 @@ except:
|
||||
gzip_ok = 0
|
||||
|
||||
fileroot = ""
|
||||
strip_photo = 0
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -55,7 +56,7 @@ def sortById(first,second):
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
def fix(line):
|
||||
l = string.strip(line)
|
||||
l = string.stripline)
|
||||
l = string.replace(l,'&','&')
|
||||
l = string.replace(l,'>','>')
|
||||
l = string.replace(l,'<','<')
|
||||
@ -336,6 +337,9 @@ def write_object(g,object):
|
||||
id = object.getId()
|
||||
type = object.getMimeType()
|
||||
path = object.getPath()
|
||||
if strip_photo:
|
||||
path = os.path.basename(path)
|
||||
else:
|
||||
l = len(fileroot)
|
||||
if len(path) >= l:
|
||||
if fileroot == path[0:l]:
|
||||
|
Loading…
Reference in New Issue
Block a user