Only append CRC32 to filename when the function name is truncated

This commit is contained in:
Ole André Vadla Ravnås
2014-05-14 00:54:23 +02:00
parent 05a731352d
commit 96c0c0be83
+2
View File
@@ -507,6 +507,8 @@ def to_filename(name):
def to_handler_filename(name):
full_filename = to_filename(name)
if len(full_filename) <= 41:
return full_filename + ".js"
crc = binascii.crc32(full_filename.encode())
return full_filename[0:32] + "_%08x.js" % crc