Skip to content
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: Truncate() on a non existent file produces error with typo #7255

Closed
gopherbot opened this issue Feb 3, 2014 · 3 comments
Closed

os: Truncate() on a non existent file produces error with typo #7255

gopherbot opened this issue Feb 3, 2014 · 3 comments

Comments

@gopherbot
Copy link

@gopherbot gopherbot commented Feb 3, 2014

by abel@rewardstyle.com:

What steps will reproduce the problem?
If possible, include a link to a program on play.golang.org.
1. Try truncating a file that doesn't exist


What is the expected output?
truncate file=/path/to/file: no such file or directory

What do you see instead?
truncate ile=/path/to/file: no such file or directory

Which compiler are you using (5g, 6g, 8g, gccgo)?


Which operating system are you using?
Mac OSX Mountain Lion

Which version are you using?  (run 'go version')
1.1.2

Please provide any additional information below.

Just a typo in the error message...
@davecheney

This comment has been minimized.

Copy link
Contributor

@davecheney davecheney commented Feb 3, 2014

Comment 1:

I am not able to reproduce the issue
lucky(~/src) % cat truncate.go 
package main
import "fmt"
import "os"
func main() {
        fmt.Println(os.Truncate("/yolo", 0))
}
# linux
lucky(~/src) % go run truncate.go
truncate /yolo: no such file or directory
# osx mountain lion
odessa(~/src) % go run truncate.go 
truncate /yolo: no such file or directory
Can you please update to Go 1.2 and try again, this issue may have already been fixed.

Labels changed: added repo-main.

Status changed to WaitingForReply.

@gopherbot

This comment has been minimized.

Copy link
Author

@gopherbot gopherbot commented Feb 3, 2014

Comment 3 by abel@rewardstyle.com:

In walking back through this to see why it isn't reproducible, I found that the file
path was being incorrectly parsed (i.e. the ile= was coming from inside the program). My
apologies for that.
Cheers,
Abel
@davecheney

This comment has been minimized.

Copy link
Contributor

@davecheney davecheney commented Feb 4, 2014

Comment 4:

No problems.

Status changed to Retracted.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.