Incorrect directory creation in _save_FIELD_file
|Reported by:||henry||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Severity:||Keywords:||file directory creation fs-rf-fixed|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||yes||Patch needs improvement:||no|
The function _save_FIELD_file incorrectly assumes that if makedirs throw an Exception it is because the directory already exists.
All kind of errors can trigger an exception (permission denied / no space left on device / hardware error ...). By silently ignoring the error, this function makes it harder to detect these problems.
The attached patch fixes these problems.
Change History (9)
Changed 8 years ago by henry <henry@…>
comment:1 Changed 8 years ago by SmileyChris
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Design decision needed
comment:5 Changed 8 years ago by russellm
- Needs tests set
- Triage Stage changed from Design decision needed to Accepted