From 63ed3c0d41097969e86ce975b537da461a6dc9b4 Mon Sep 17 00:00:00 2001 From: Ben-Fields <33070053+Ben-Fields@users.noreply.github.com> Date: Wed, 24 Feb 2021 06:40:17 -0600 Subject: [PATCH] tools: fix shortcut creation error in `v symlink` on windows (#8935) --- cmd/tools/vsymlink.v | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/tools/vsymlink.v b/cmd/tools/vsymlink.v index 805d15987b..15cf4e6e9e 100644 --- a/cmd/tools/vsymlink.v +++ b/cmd/tools/vsymlink.v @@ -49,9 +49,10 @@ fn setup_symlink_windows(vexe string) { vsymlinkdir := os.join_path(vdir, '.bin') mut vsymlink := os.join_path(vsymlinkdir, 'v.exe') if !os.exists(vsymlinkdir) { - os.mkdir_all(vsymlinkdir) or { panic(err) } // will panic if fails + os.mkdir(vsymlinkdir) or { panic(err) } // will panic if fails } else { - os.rm(vsymlink) or { panic(err) } + os.rmdir(vsymlinkdir) or { panic(err) } + os.mkdir(vsymlinkdir) or { panic(err) } } // First, try to create a native symlink at .\.bin\v.exe os.symlink(vsymlink, vexe) or {