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: