move() now copies as a fallback

--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4021
This commit is contained in:
adrian.sampson 2008-06-25 01:43:16 +00:00
parent 66d767c054
commit fe67fe00dc

View file

@ -1,4 +1,4 @@
import sqlite3, os, sys, operator, re
import sqlite3, os, sys, operator, re, shutil
from beets.tag import MediaFile, FileTypeError
from string import Template
@ -281,7 +281,7 @@ class Item(object):
raise Exception('skipping move')
os.rename(self.path, dest)
except: # copy
FixMe
shutil.copy(self.path, dest)
# Either copying or moving succeeded, so update the stored path.
self.path = dest