From 6b5edbeeada891e37b51eacf7cc87b18a7c1d8e5 Mon Sep 17 00:00:00 2001 From: Adrian Sampson Date: Fri, 30 Jul 2010 15:27:53 -0700 Subject: [PATCH] path sanitation now removes ? --- beets/library.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beets/library.py b/beets/library.py index 2e639e334..fdc18bea8 100644 --- a/beets/library.py +++ b/beets/library.py @@ -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.