Skip to content

Commit

Permalink
fix overwriting symlinks...
Browse files Browse the repository at this point in the history
  • Loading branch information
wisp3rwind committed Mar 21, 2020
1 parent 7da3403 commit 04ad8dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beetsplug/alternatives.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ def update(self, create=None):
.format(displayable_path(dest)),
require=False)
elif (os.path.isfile(syspath(dest))):
replace = input_yn(u"There is a file at '{0}', "
replace = input_yn(u"There is a file at '{0}'. "
"Are you sure you wan't to replace it with a "
"symlink for your alternative collection? (y/n)"
.format(displayable_path(dest)),
Expand All @@ -465,13 +465,13 @@ def update(self, create=None):
continue
item.store()

def create_symlink(self, item):
def create_symlink(self, item, replace=False):
dest = self.destination(item)
util.mkdirall(dest)
link = (
os.path.relpath(item.path, os.path.dirname(dest))
if self.relativelinks == self.LINK_RELATIVE else item.path)
util.link(link, dest)
util.link(link, dest, replace)

def sync_art(self, item, path):
# FIXME: symlink art
Expand Down

0 comments on commit 04ad8dd

Please sign in to comment.