mirror of
https://github.com/beetbox/beets.git
synced 2025-12-09 10:05:35 +01:00
path sanitation now removes ?
This commit is contained in:
parent
2e23c2acc6
commit
6b5edbeead
1 changed files with 3 additions and 3 deletions
|
|
@ -167,12 +167,12 @@ def _unicode_path(path):
|
|||
return path.decode(sys.getfilesystemencoding())
|
||||
|
||||
# Note: POSIX actually supports \ and : -- I just think they're
|
||||
# a pain.
|
||||
# a pain. And ? has caused problems for some.
|
||||
CHAR_REPLACE = [
|
||||
(re.compile(r'[\\/]|^\.'), u'_'),
|
||||
(re.compile(r'[\\/\?]|^\.'), u'_'),
|
||||
(re.compile(r':'), u'-'),
|
||||
]
|
||||
CHAR_REPLACE_WINDOWS = re.compile('["\*\?<>\|]|^\.|\.$'), u'_u'
|
||||
CHAR_REPLACE_WINDOWS = re.compile('["\*<>\|]|^\.|\.$'), u'_u'
|
||||
def _sanitize_path(path, plat=None):
|
||||
"""Takes a path and makes sure that it is legal for the specified
|
||||
platform (as returned by platform.system()). Returns a new path.
|
||||
|
|
|
|||
Loading…
Reference in a new issue