Skip to content

Commit

Permalink
Failing to link a file now throws a FilesystemError.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rovanion committed Aug 28, 2014
1 parent 3b89816 commit b0a843c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions beets/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,12 @@ def link(path, dest, replace=False):
if os.path.exists(dest) and not replace:
raise FilesystemError('file exists', 'rename', (path, dest),
traceback.format_exc())

try:
os.symlink(path, dest)
except OSError:
print "WAAT!"
raise FilesystemError('Operating system does not support symbolic '
'links.', 'link', (path, dest),
traceback.format_exc())


def unique_path(path):
Expand Down

0 comments on commit b0a843c

Please sign in to comment.