summaryrefslogtreecommitdiff
path: root/django/core/files/move.py
AgeCommit message (Collapse)Author
2025-07-23Refs #36500 -- Rewrapped long docstrings and block comments via a script.django-bot
Rewrapped long docstrings and block comments to 79 characters + newline using script from https://github.com/medmunds/autofix-w505.
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2025-04-07Fixed #36298 -- Truncated the overwritten file content in file_move_safe().Sarah Boyce
Regression in 58cd4902a71a3695dd6c21dc957f59c333db364c. Thanks Baptiste Mispelon for the report.
2024-03-24Fixed #35323 -- Prevented file_move_safe() from trying to overwrite existing ↵Ben Cail
file when allow_overwrite is False.
2024-03-21Fixed #35320 -- Removed unnecessary django.core.files.move._samefile() hook.Ben Cail
os.path.samefile() uses the same implementation on Windows as all other platforms since Python 3.4.
2022-10-24Fixed #29027 -- Fixed file_move_safe() crash when moving files with SELinux.Yuri Konotopov
Thanks Florian Apolloner for the review.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2019-01-28Fixed #30137 -- Replaced OSError aliases with the canonical OSError.Jon Dufresne
Used more specific errors (e.g. FileExistsError) as appropriate.
2017-09-07Reverted "Fixed #27818 -- Replaced try/except/pass with contextlib.suppress()."Tim Graham
This reverts commit 550cb3a365dee4edfdd1563224d5304de2a57fda because try/except performs better.
2017-06-28Fixed #27818 -- Replaced try/except/pass with contextlib.suppress().Mads Jensen
2017-05-31Fixed #28170 -- Fixed file_move_safe() crash when moving files to a CIFS mount.Derrick Jackson
2017-02-21Refs #27656 -- Updated django.core docstring verbs according to PEP 257.Anton Samarchyan
2017-01-25Refs #23919 -- Replaced errno checking with PEP 3151 exceptions.Tim Graham
2015-02-06Sorted imports with isort; refs #23860.Tim Graham
2014-12-24Removed shutil.copystat copied from stdlib (added to support an old Python?).Tim Graham
2013-12-14Fixed E127 pep8 warnings.Loic Bistuer
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-11-03Fixed flake8 E251 violationsMilton Mazzarri
2013-11-02More attacking E302 violatorsAlex Gaynor
2013-10-24Start attacking E231 violationsAlex Gaynor
2013-10-23Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol
2013-06-20Fixed #20486 -- Ensure that file_move_safe raises an error if the ↵Russell Keith-Magee
destination already exists. Thanks to kux for the report, and Russ Webber for the patch.
2013-05-26Replaced `and...or...` constructs with PEP 308 conditional expressions.Ramiro Morales
2012-08-18[py3] Fixed slow path through file_move_safeKaren Tracey
This path is taken on Windows.
2012-05-05Made more extensive usage of context managers with open.Claude Paroz
2012-04-29Fixed #18013 -- Use the new 'as' syntax for exceptions.Claude Paroz
Thanks Clueless for the initial patch. Note that unittest has been purposely left out (external package only used by Python 2.6).
2009-04-05Fixed #8900: Added errno=13 (permission denied) to the class of ignored ↵Karen Tracey
OSErrors when attempting to delete the old file in file_move_safe. This error was seen on Windows with Pythons < 2.5. In the case where the error was seen, the old file is auto-deleted on close anyway by the Windows-specific NamedTemporaryFile support. No new test because the failure could be seen when running the file_uploads test with Python 2.3/2.4 on Windows. With this fix file_uploads runs clean in that environment. While in the neignborhood fixed up the docstrings to better match the reality of what the code does and what the function is named. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-29Fixed #8673: fixed a missing import in `django.core.files.move`.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8720 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-23Fixed #8203 -- Fixed temporary file deleation on Windows and a couple of edgeMalcolm Tredinnick
cases on Unix-like systems. Patch from snaury. Testing and verification on Windows, Mac and Linux from cgrady and ramikassab. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-11Fixed #4948, a race condition in file saving. Thanks to Martin von Löwis, ↵Jacob Kaplan-Moss
who diagnosed the problem and pointed the way to a fix. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8306 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-07-01Fixed #2070: refactored Django's file upload capabilities.Jacob Kaplan-Moss
A description of the new features can be found in the new [http://www.djangoproject.com/documentation/upload_handing/ upload handling documentation]; the executive summary is that Django will now happily handle uploads of large files without issues. This changes the representation of uploaded files from dictionaries to bona fide objects; see BackwardsIncompatibleChanges for details. git-svn-id: http://code.djangoproject.com/svn/django/trunk@7814 bcc190cf-cafb-0310-a4f2-bffc1f526a37