File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -995,12 +995,13 @@ def symlink(
995995 directory_path = path / directory
996996 if not directory_path .exists ():
997997 return # No touching link, dest doc not built yet.
998- if link .exists () and readlink (link ) == directory :
999- return # Link is already pointing to right doc.
1000- if link .exists ():
1001- link .unlink ()
1002- link .symlink_to (directory )
1003- run (["chown" , "-h" , ":" + group , str (link )])
998+
999+ if not link .exists () or readlink (link ) != directory :
1000+ # Link does not exist or points to the wrong target.
1001+ if link .exists ():
1002+ link .unlink ()
1003+ link .symlink_to (directory )
1004+ run (["chown" , "-h" , f":{ group } " , str (link )])
10041005 if not skip_cache_invalidation :
10051006 surrogate_key = f"{ language .tag } /{ name } "
10061007 purge_surrogate_key (http , surrogate_key )
You can’t perform that action at this time.
0 commit comments