diff --git a/NEWS.txt b/NEWS.txt index 89795f7e3..60931c336 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -20,6 +20,7 @@ Version 0.9.0alpha6 - 2007-04-04 MusicBrainz. (#2548) * Fixed problem with removing albums/files after submitting PUIDs (#2556) * The user's script should be applied also to album metadata. + * Fixed moving of additional files from paths with "special" characters. * Internals: * The browser integration HTTP server rewritten using QTcpServer. diff --git a/picard/__init__.py b/picard/__init__.py index 08ce66443..9060e12db 100644 --- a/picard/__init__.py +++ b/picard/__init__.py @@ -17,7 +17,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -version_info = (0, 9, 0, 'alpha', 5) +version_info = (0, 9, 0, 'alpha', 6) if version_info[3] == 'final': version_string = '%d.%d.%d' % version_info[:3] diff --git a/picard/file.py b/picard/file.py index b8c20b6be..0404e917d 100644 --- a/picard/file.py +++ b/picard/file.py @@ -220,12 +220,13 @@ class File(LockableObject, Item): patterns = filter(bool, [p.strip() for p in patterns.split()]) files = [] for pattern in patterns: - pattern = os.path.join(old_path, pattern) - for old_file in glob.glob(pattern): + # FIXME glob1 is not documented, maybe we need our own implemention? + for old_file in glob.glob1(old_path, pattern): + new_file = os.path.join(new_path, old_file) + old_file = os.path.join(old_path, old_file) if self.tagger.get_file_by_filename(decode_filename(old_file)): self.log.debug("File loaded in the tagger, not moving %r", old_file) continue - new_file = os.path.join(new_path, os.path.basename(old_file)) self.log.debug("Moving %r to %r", old_file, new_file) shutil.move(old_file, new_file)