Commit 2891984d authored by Matthias Putz's avatar Matthias Putz

bugfix in link creation in windows cmd

parent 238c8f80
...@@ -47,12 +47,13 @@ def os_link(src, dst): ...@@ -47,12 +47,13 @@ def os_link(src, dst):
src = os.path.relpath(src, os.path.dirname(dst)) src = os.path.relpath(src, os.path.dirname(dst))
os.symlink(src, dst) os.symlink(src, dst)
else: else:
isDir = True if os.path.isdir(src) else False
src = os.path.relpath(src, os.path.dirname(dst)) src = os.path.relpath(src, os.path.dirname(dst))
src = toWindowsPath(src) src = toWindowsPath(src)
dst = toWindowsPath(dst) dst = toWindowsPath(dst)
# ln in MinGW does not create hard links? - it copies # ln in MinGW does not create hard links? - it copies
# call windows cmd tool 'mklink' from git bash (mingw) # call windows cmd tool 'mklink' from git bash (mingw)
if os.path.isdir(src): if isDir:
cmd = 'cmd /c mklink /D "%s" "%s"' % (dst, src) cmd = 'cmd /c mklink /D "%s" "%s"' % (dst, src)
if IsTrace(): if IsTrace():
Trace(cmd) Trace(cmd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment