Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[py3] Fixed slow path through file_move_safe

This path is taken on Windows.
  • Loading branch information...
commit e99293250ed9d0ae471faff240bc2e9910a1ec6f 1 parent 1758bf7
@kmtracey kmtracey authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/core/files/move.py
View
2  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:
Please sign in to comment.
Something went wrong with that request. Please try again.