mirror of
https://github.com/beetbox/beets.git
synced 2026-01-19 06:34:05 +01:00
fix copy(): don't raise OSError because file exists if replace parameter is True
This commit is contained in:
parent
00d47b1bff
commit
8d773e27a2
1 changed files with 2 additions and 1 deletions
|
|
@ -241,7 +241,8 @@ def copy(path, dest, replace=False, pathmod=None):
|
|||
return
|
||||
path = syspath(path)
|
||||
dest = syspath(dest)
|
||||
_assert_not_exists(dest, pathmod)
|
||||
if not replace:
|
||||
_assert_not_exists(dest, pathmod)
|
||||
return shutil.copyfile(path, dest)
|
||||
|
||||
def move(path, dest, replace=False, pathmod=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue