Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#17939 closed Bug (duplicate)

Staticfiles overwriting files incorrectly

Reported by: marc.tamlyn@… Owned by: nobody
Component: contrib.staticfiles Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I believe there's an issue with the way collectstatic operates when the collected folder is not empty.

Suppose I've got files like this:

my_first_app/static/base.css
my_second_app/static/base.css

And INSTALLED_APPS places my_first_app above my_second_app, then findstatic --first will tell me that the file in my_first_app will be used. However if I run the following sequence, it gets overwritten with the file from my_second_app.

manage.py collectstatic
touch my_second_app/static/base.css
manage.py collectstatic

collectstatic seems to pick up the changed timestamp but ignores the fact that file should be overwritten. For the moment we've had to patch our deploy so that it deletes the collected static each time.

It seems to me that this is not expected behaviour. I've not written an automated test case for it as yet but can try to if this is indeed broken.

Change History (4)

comment:1 by Jannis Leidel, 12 years ago

Which version of Django are you using?

I suspect this is a duplicate of #17737 which has been fixed in r17612 (and r17613).

comment:2 by marc.tamlyn@…, 12 years ago

Resolution: duplicate
Status: newclosed

Running 1.3.1 at the moment. Looks like it is a duplicate, I was failing to find the relevant ticket sorry. Tried it on the trunk version and it works fine. Looking forward to 1.4!

comment:3 by Jannis Leidel, 12 years ago

FTR, it'll be fixed in an upcoming 1.3.2, too.

comment:4 by marc.tamlyn@…, 12 years ago

That's good to know, thanks.

Note: See TracTickets for help on using tickets.
Back to Top