git-svn-id: https://wikiteam.googlecode.com/svn/trunk@222 31edc4fc-5e31-b4c4-d58b-c8bc928bcb95
pull/117/head
emijrp 13 years ago
parent e933c780b5
commit 60f7fa88a1

@ -529,6 +529,7 @@ def generateImageDump(config={}, other={}, images=[], start=''):
if lock:
continue
delay(config=config)
#saving file
#truncate filename if length > 100 (100 + 32 (md5) = 132 < 143 (crash limit). Later .desc is added to filename, so better 100 as max)
filename2 = filename
@ -536,7 +537,8 @@ def generateImageDump(config={}, other={}, images=[], start=''):
# split last . (extension) and then merge
filename2 = truncateFilename(other=other, filename=filename2)
print 'Truncating filename, it is too long. Now it is called:', filename2
urllib.urlretrieve(url, '%s/%s' % (imagepath, filename2))
urllib.urlretrieve(url, '%s/%s' % (imagepath, filename2))
#saving description if any
xmlfiledesc = getXMLFileDesc(config=config, title='Image:%s' % (filename))
f = open('%s/%s.desc' % (imagepath, filename2), 'w')

Loading…
Cancel
Save