File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed
compas_ghpython/components Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
1212### Changed
1313
14+ * Changed ` compas._os._polyfill_symlinks ` to use junction (/J) instead of symbolic link (/D).
15+
1416### Removed
1517
1618
Original file line number Diff line number Diff line change @@ -316,7 +316,7 @@ def _polyfill_symlinks(symlinks, raise_on_error):
316316 mklink_cmd .write ("SET /A symlink_result=0\n " )
317317 mklink_cmd .write ("ECHO ret=%symlink_result%\n " )
318318 for i , (source , link_name ) in enumerate (symlinks ):
319- dir_symlink_arg = "/D " if os .path .isdir (source ) else ""
319+ dir_symlink_arg = "/J " if os .path .isdir (source ) else ""
320320 mklink_cmd .write ("mklink {} {}\n " .format (dir_symlink_arg , subprocess .list2cmdline ([link_name , source ])))
321321 mklink_cmd .write ("IF %ERRORLEVEL% EQU 0 SET /A symlink_result += {} \n " .format (2 ** i ))
322322
Original file line number Diff line number Diff line change 2626import glob
2727import os
2828
29- from compas ._os import create_symlinks
3029from compas ._os import remove_symlinks
30+ from compas ._os import copy as _copy
3131from compas_ghpython import get_grasshopper_userobjects_path
3232from compas_rhino import _check_rhino_version
3333import compas_rhino
@@ -75,7 +75,14 @@ def install_userobjects(source):
7575 remove_symlinks (symlinks_to_remove )
7676
7777 # And the create new ones
78- created = create_symlinks (symlinks_to_add )
78+ created = []
79+ for src , dst in symlinks_to_add :
80+ try :
81+ _copy (src , dst )
82+ except Exception :
83+ created .append (False )
84+ else :
85+ created .append (True )
7986
8087 return list (zip (symlinks_to_add , created ))
8188
You can’t perform that action at this time.
0 commit comments