From 9a7d2c19fc4c4c7bc328fa1c72816ae6ef4df8a8 Mon Sep 17 00:00:00 2001 From: Uriziel Date: Sun, 10 Nov 2013 13:09:28 +0100 Subject: [PATCH] Fixed the issue with utf8 filenames hashing --- syncplay/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncplay/utils.py b/syncplay/utils.py index 33b9a82..2ae76f6 100644 --- a/syncplay/utils.py +++ b/syncplay/utils.py @@ -136,7 +136,7 @@ def stripfilename(filename): return re.sub(constants.FILENAME_STRIP_REGEX,"",filename) def hashFilename(filename): - return hashlib.sha256(stripfilename(filename)).hexdigest()[:12] + return hashlib.sha256(stripfilename(filename).encode('utf-8')).hexdigest()[:12] def hashFilesize(size): return hashlib.sha256(str(size)).hexdigest()[:12]