mirror of
https://github.com/django/django.git
synced 2025-10-03 07:14:41 +00:00
[py3] Fixed slow path through file_move_safe
This path is taken on Windows.
This commit is contained in:
parent
1758bf76e4
commit
e99293250e
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ def file_move_safe(old_file_name, new_file_name, chunk_size = 1024*64, allow_ove
|
||||||
try:
|
try:
|
||||||
locks.lock(fd, locks.LOCK_EX)
|
locks.lock(fd, locks.LOCK_EX)
|
||||||
current_chunk = None
|
current_chunk = None
|
||||||
while current_chunk != '':
|
while current_chunk != b'':
|
||||||
current_chunk = old_file.read(chunk_size)
|
current_chunk = old_file.read(chunk_size)
|
||||||
os.write(fd, current_chunk)
|
os.write(fd, current_chunk)
|
||||||
finally:
|
finally:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue