#20486: file_move_safe doesn't respect it's docstring
--------------------------------------+--------------------
     Reporter:  kux                   |      Owner:  nobody
         Type:  Bug                   |     Status:  new
    Component:  File uploads/storage  |    Version:  1.4
     Severity:  Normal                |   Keywords:
 Triage Stage:  Unreviewed            |  Has patch:  0
Easy pickings:  0                     |      UI/UX:  0
--------------------------------------+--------------------
 django.core.files.move.file_move_safe's docstring states the following:

     If the destination file exists and ``allow_overwrite`` is ``False``,
 this
     function will throw an ``IOError``.

 However, if the destination file exists and movement is performed using
 os.rename (which is the case most of the times) then no exception is being
 thrown. The exception is only being thrown if streaming manually from one
 file to another.

 This could be fixed by doing one of the following:
 1. update the docstring to match the actual behavior
 2. make the function raise IOError regardless of how the movement is being
 performed

-- 
Ticket URL: <https://code.djangoproject.com/ticket/20486>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/046.259b0a7fb67a96b0be7da8290b20f731%40djangoproject.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to