From f80ad39df06888ef7b6349d9370c263d5c14e645 Mon Sep 17 00:00:00 2001 From: PiRSquared17 Date: Sat, 28 Mar 2015 15:17:06 +0000 Subject: [PATCH] Make filename truncation work with UTF-8 --- dumpgenerator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dumpgenerator.py b/dumpgenerator.py index 77bf925..29ff6d3 100755 --- a/dumpgenerator.py +++ b/dumpgenerator.py @@ -59,7 +59,7 @@ def getVersion(): def truncateFilename(other={}, filename=''): """ Truncate filenames when downloading images with large filenames """ return filename[:other['filenamelimit']] + \ - md5(filename).hexdigest() + '.' + filename.split('.')[-1] + md5(filename.encode('utf-8')).hexdigest() + '.' + filename.split('.')[-1] def delay(config={}, session=None):