-
Notifications
You must be signed in to change notification settings - Fork 17.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
os: MkdirAll exits without creating all folders #20289
Comments
Please show us a complete, standalone, preferably small, program that demonstrates the problem. Thanks. |
Ok this is embarrassing ... for some reason it started working. I didn't even closed my editor/terminals and it just decided to work. |
This is seriously weird. If I just have the mkdirall and the chdir commands it works. But if it's with the rest of the file it doesn't?
|
If I comment out the os.RemoveAll(path) it works?? |
Please make sure what happen with your code. please check all of err returned. |
There is no error from os.MkdirAll and os.Chdir only says "abort: error getting current working directory: No such file or directory" |
This seems not be a bug of Go. Please check output of commands you run. |
OK my bad, thought the output was coming from os.Chdir lol |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?1.8.1
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build846921896=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
Directory created and changed working directory.
What did you see instead?
abort: error getting current working directory: No such file or directory
Last folder in the path was never created, even sleeping does not create the folder. Only exiting the program does the folder appear in the filesystem.
The text was updated successfully, but these errors were encountered: