mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-04 07:02:12 +03:00
do the right thing when handling a broken symlink
This commit is contained in:
parent
5f2937c188
commit
36f4ec1da0
@ -22,7 +22,7 @@ def symlink_if_necessary(source, target):
|
||||
- If the target already exists and points somewhere else, remove it
|
||||
and relink.
|
||||
"""
|
||||
if os.path.exists(target):
|
||||
if os.path.lexists(target):
|
||||
if os.path.isfile(target):
|
||||
logging.debug(f"`{target}` is a regular file")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user