You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My initial assumptions on the nature of the bug were wrong, so the behavior described might be intended (though I did not find clear documentation that the behavior is expected).
What version of Go are you using (go version)?
go version go1.9.2 windows/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\username\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
What did you do?
package main
import (
"fmt"
"path/filepath"
)
func main() {
if path, err := filepath.EvalSymlinks("c:\\Go"); err == nil {
fmt.Println("Not symlink but no error")
}
}
What did you expect to see?
Nothing printed as no symlink was provided.
What did you see instead?
Any valid path returns without error.
The text was updated successfully, but these errors were encountered:
PrototypeNM1
changed the title
filepath.EvalSymlinks returns without error for non-symlink, drive letter only paths
filepath.EvalSymlinks returns without error for non-symlinks
Jan 22, 2018
PrototypeNM1
changed the title
filepath.EvalSymlinks returns without error for non-symlinks
filepath.EvalSymlinks returns without error for non-symlink, valid paths
Jan 22, 2018
EvalSymlinks returns the path name after the evaluation of any symbolic links.
(emphasis mine)
I believe this is by design, and I think that the line above should be clear enough. The godoc can always be extended with clarifications if other people think it's unclear as it is now.
This was probably a blind spot in my reading of "evaluation" then; for what it's worth I would have read "resolution" in place of "evaluation" correctly. I'll go ahead and close the issue.
mikioh
changed the title
filepath.EvalSymlinks returns without error for non-symlink, valid paths
path/filepath: filepath.EvalSymlinks returns without error for non-symlink, valid paths
Jan 26, 2018
My initial assumptions on the nature of the bug were wrong, so the behavior described might be intended (though I did not find clear documentation that the behavior is expected).
What version of Go are you using (
go version
)?go version go1.9.2 windows/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\username\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
What did you do?
What did you expect to see?
Nothing printed as no symlink was provided.
What did you see instead?
Any valid path returns without error.
The text was updated successfully, but these errors were encountered: