aboutsummaryrefslogtreecommitdiffstats
path: root/beetsplug
diff options
context:
space:
mode:
authorWolfgang Müller2022-02-28 18:46:27 +0100
committerWolfgang Müller2022-02-28 18:46:27 +0100
commitdc021d5e05145c2e25bf0334032ff1c2054cf2ce (patch)
tree942d85d5d77e19fe5106b362e6268be09442c10a /beetsplug
parente94b6ed8e4cc925c2051c133fa3b5d3b2b2971a2 (diff)
downloadbeets-oriole-dc021d5e05145c2e25bf0334032ff1c2054cf2ce.tar.gz
extras: Use shutil.move instead of os.rename
os.rename fails when moving files between devices or filesystems. Instead use shutil.move which uses os.rename or falls back to copying the files and removing the originals.
Diffstat (limited to '')
-rw-r--r--beetsplug/extras.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/beetsplug/extras.py b/beetsplug/extras.py
index a8d02e0..e731b6e 100644
--- a/beetsplug/extras.py
+++ b/beetsplug/extras.py
@@ -11,7 +11,7 @@ class ExtrasPlugin(beets.plugins.BeetsPlugin):
def on_item_moved(self, item, source, destination):
for (sourcepath, destpath) in self.gather(source, destination):
- os.rename(sourcepath, destpath)
+ shutil.move(sourcepath, destpath)
def on_item_copied(self, item, source, destination):
for (sourcepath, destpath) in self.gather(source, destination):