limit filename length with 128 chars plus extension

This commit is contained in:
Maks Snegov 2014-10-04 10:59:32 -04:00
parent 6b3aa602ef
commit 23f648e1ad

View File

@ -168,7 +168,7 @@ def write_file(page, title, comment=None):
inc = 0 inc = 0
while True: while True:
inc += 1 inc += 1
fname = ' '.join(title.replace('/', '_').split()) + write_inc(inc) + '.html' fname = (' '.join(title.replace('/', '_').split()) + write_inc(inc))[:128] + '.html'
if not os.path.exists(fname): if not os.path.exists(fname):
break break