File removal race condition in FileSystemStorage
|Reported by:||Aymeric Augustin||Owned by:||nobody|
|Severity:||Normal||Keywords:||FileSystemStorage file deletion race condition|
|Cc:||piethon@…||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
#16082 describes a race condition in directory creation. It was fixed, however, the same race condition still exists in the file removal code, a few lines below.
While this bug is unlikely to show up in production, it's probably worth fixing in the same way, for the sake of consistency and robustness.
Attached patch proposes a fix similar to r16280. Also, it improves slightly the test case added at that revision.