mirror of
https://github.com/fergalmoran/picard.git
synced 2026-02-20 14:44:05 +00:00
Fixed moving of additional files from paths with "special" characters.
This commit is contained in:
1
NEWS.txt
1
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.
|
||||
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user