Open ioanarusiczki opened 2 years ago
This is because django storage class tries not to overwrite the existing file (https://github.com/django/django/blob/b626c5a9798b045b655d085d59efdd60b5d7a0e3/django/core/files/storage.py#L79-L83 and related code). Ultimately it works, as noted the content is not affected, but the filename gets messed up.
This seems to me to be a django bug really - it doesn't see .tar.bz2
as a file extension, only .bz2
, when trying to generate an alternative name. It'd happen anywhere a filename like that was used (in our case only really with source code uploads though)
Yeah. Ideally we should force an overwrite (need to use a custom storage class), though. We have no need for the old file.
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-81
STR:
Expected result: The file extension is tar.gz or tar.bz2
Actual result: there's a " _" followed by letters between
tar
andbz2
Notes: the content of the archive is not affected deleting that part
_W1aheeg
makes the archive re-usable for uploads.cc diox
┆Issue is synchronized with this Jira Task