We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6966676 commit 76fce59Copy full SHA for 76fce59
internal/os/smb/api.go
@@ -38,6 +38,13 @@ func (APIImplementor) IsSmbMapped(remotePath string) (bool, error) {
38
// alpha to merge the paths.
39
// TODO (for beta release): Merge the link paths - os.Symlink and Powershell link path.
40
func (APIImplementor) NewSmbLink(remotePath, localPath string) error {
41
+
42
+ if !strings.HasSuffix(remotePath, "\\") {
43
+ // Golang has issues resolving paths mapped to file shares if they do not end in a trailing \
44
+ // so add one if needed.
45
+ remotePath = remotePath + "\\"
46
+ }
47
48
cmdLine := fmt.Sprintf(`New-Item -ItemType SymbolicLink $Env:smblocalPath -Target $Env:smbremotepath`)
49
cmd := exec.Command("powershell", "/c", cmdLine)
50
cmd.Env = append(os.Environ(),
0 commit comments