Skip to content

Commit 63cbfe6

Browse files
committed
use a junction instead of a symbolic link
1 parent 8e21328 commit 63cbfe6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

src/compas/_os.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)