From e99293250ed9d0ae471faff240bc2e9910a1ec6f Mon Sep 17 00:00:00 2001 From: Karen Tracey Date: Sat, 18 Aug 2012 15:44:09 -0400 Subject: [PATCH] [py3] Fixed slow path through file_move_safe This path is taken on Windows. --- django/core/files/move.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/core/files/move.py b/django/core/files/move.py index f9060fd3d8..3af02634fe 100644 --- a/django/core/files/move.py +++ b/django/core/files/move.py @@ -66,7 +66,7 @@ def file_move_safe(old_file_name, new_file_name, chunk_size = 1024*64, allow_ove try: locks.lock(fd, locks.LOCK_EX) current_chunk = None - while current_chunk != '': + while current_chunk != b'': current_chunk = old_file.read(chunk_size) os.write(fd, current_chunk) finally: