From 92120217eb27d820bfba0f6a50837f111cbf80ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Marqui=CC=81nez=20Ferra=CC=81ndiz?= Date: Tue, 18 Nov 2014 23:28:42 +0100 Subject: [cache] Fix writing to paths with unicode characters * Use "compat_getenv" * "write_json_file" now expects the filename to be a string --- youtube_dl/utils.py | 1 + 1 file changed, 1 insertion(+) (limited to 'youtube_dl/utils.py') diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 50e515a04..94b496dd0 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -73,6 +73,7 @@ def preferredencoding(): def write_json_file(obj, fn): """ Encode obj as JSON and write it to fn, atomically """ + fn = encodeFilename(fn) if sys.version_info < (3, 0): encoding = get_filesystem_encoding() # os.path.basename returns a bytes object, but NamedTemporaryFile -- cgit v1.2.3