Skip to content

Commit 1245b80

Browse files
committed
Merge remote-tracking branch 'origin/master' into edge
2 parents cbe9e41 + 891b499 commit 1245b80

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mig/shared/useradm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def create_alias_link(username, client_id, user_home):
133133
client_dir = client_id_dir(client_id)
134134
home_dir = os.path.join(user_home, client_dir)
135135
link_path = os.path.join(user_home, username)
136-
if os.path.exists(link_path):
136+
if os.path.islink(link_path):
137137
return True
138138
try:
139139
os.symlink(client_dir, link_path)
@@ -804,7 +804,7 @@ def create_user_in_fs(configuration, client_id, user, now, renew, force, verbose
804804
continue
805805
_logger.debug("handling link to %s in %s" % (target_dir,
806806
target_link))
807-
if os.path.exists(target_link):
807+
if os.path.islink(target_link):
808808
_logger.debug("remove old link in %s" % target_link)
809809
delete_symlink(target_link, _logger)
810810
else:

0 commit comments

Comments
 (0)