link_fixer for single file now works!
This commit is contained in:
@@ -6,8 +6,8 @@ from pathlib import Path
|
||||
from os.path import relpath # won't be necessary with Python 3.12 thanks to walk_up arg in relative_to()
|
||||
|
||||
def swap_link(lnk, tgt):
|
||||
#lnk: symbolic link to swap
|
||||
#tgt: target for new link
|
||||
#lnk: symbolic link to swap, str
|
||||
#tgt: target for new link, str
|
||||
lnpath = Path(lnk)
|
||||
if not lnpath.is_symlink():
|
||||
raise Exception("First argument is not a symbolic link")
|
||||
|
||||
Reference in New Issue
Block a user