Opened 9 years ago
Last modified 4 years ago
#26591 closed Bug
Incorrect Manifest Keys for ManifestStaticFilesStorage on Windows — at Initial Version
Reported by: | David Sanders | Owned by: | nobody |
---|---|---|---|
Component: | contrib.staticfiles | Version: | dev |
Severity: | Normal | Keywords: | staticfiles manifest manifeststaticfileststorage windows |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The manifest created by ManifestStaticFilesStorage
on Windows has some incorrect keys (haven't determined the pattern yet) where slashes are '
' instead of '/'.
This silently 'succeeds' because HashedFilesMixin
will hash the original file on a 'cache miss' (in the case of ManifestStaticFilesStorage
it's a manifest miss) and insert the result into the in-memory hashed files map.
I've attached a patch for staticfiles_tests which checks that the manifest is the same in memory and on disk after the manifest tests finish (unless it was a test which cleared the in-memory version). It passes for the Linux build but fails on the Windows build, nicely illustrating the problem.
Test coverage patch