Repository navigation
gh-159428: Don't read mimetypes.knownfiles by default on Windows - #159445
Conversation
Make knownfiles empty on Windows so that only the registry is used by default. Files passed to init() or assigned to knownfiles explicitly are still read.
|
cc @zooba @python/windows-team as you commented on the PSRT email thread, too. |
zooba
left a comment
There was a problem hiding this comment.
Minor change to move the comment, but looks good to me
Co-authored-by: Steve Dower <steve.dower@microsoft.com>
|
Sorry, @cjames23 and @zooba, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-159489 is a backport of this pull request to the 3.15 branch. |
|
Sorry, @cjames23 and @zooba, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
GH-159490 is a backport of this pull request to the 3.14 branch. |
|
Sorry, @cjames23 and @zooba, I could not cleanly backport this to Please backport manually with cherry_picker, see the devguide for more information. |
|
I can't do the backports right now - might have a chance tomorrow, but if someone else wants to do them then go ahead. |
|
I will do the backports tomorrow for the remaining branches |
Make knownfiles empty on Windows so that only the registry is used by default. Files passed to init() or assigned to knownfiles explicitly are still read.
The default knownfiles are POSIX paths such as /etc/mime.types. On Windows these resolve against the root of the current drive (e.g. C:\etc\mime.types), a location that unprivileged users can usually create.