|
45 | 45 | "suffix_map", "encodings_map", "types_map", "common_types" |
46 | 46 | ] |
47 | 47 |
|
48 | | -knownfiles = [ |
49 | | - "/etc/mime.types", |
50 | | - "/etc/httpd/mime.types", # Mac OS X |
51 | | - "/etc/httpd/conf/mime.types", # Apache |
52 | | - "/etc/apache/mime.types", # Apache 1 |
53 | | - "/etc/apache2/mime.types", # Apache 2 |
54 | | - "/usr/local/etc/httpd/conf/mime.types", |
55 | | - "/usr/local/lib/netscape/mime.types", |
56 | | - "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2 |
57 | | - "/usr/local/etc/mime.types", # Apache 1.3 |
58 | | - ] |
| 48 | +if sys.platform == "win32": |
| 49 | + # The default paths would resolve to the root of the current drive on Windows |
| 50 | + # (e.g. C:\etc\mime.types), which unprivileged users can usually create. |
| 51 | + # Only the registry is used by default. |
| 52 | + knownfiles = [] |
| 53 | +else: |
| 54 | + knownfiles = [ |
| 55 | + "/etc/mime.types", |
| 56 | + "/etc/httpd/mime.types", # Mac OS X |
| 57 | + "/etc/httpd/conf/mime.types", # Apache |
| 58 | + "/etc/apache/mime.types", # Apache 1 |
| 59 | + "/etc/apache2/mime.types", # Apache 2 |
| 60 | + "/usr/local/etc/httpd/conf/mime.types", |
| 61 | + "/usr/local/lib/netscape/mime.types", |
| 62 | + "/usr/local/etc/httpd/conf/mime.types", # Apache 1.2 |
| 63 | + "/usr/local/etc/mime.types", # Apache 1.3 |
| 64 | + ] |
59 | 65 |
|
60 | 66 | inited = False |
61 | 67 | _db = None |
|
0 commit comments