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

localfs NewWriter, should use O_TRUNC ? #52

Closed
mh-cbon opened this issue May 10, 2018 · 3 comments · Fixed by #53
Closed

localfs NewWriter, should use O_TRUNC ? #52

mh-cbon opened this issue May 10, 2018 · 3 comments · Fixed by #53

Comments

@mh-cbon
Copy link
Contributor

mh-cbon commented May 10, 2018

hi,

when i read the doc about NewWriter it says,

		// NewWriter returns a io.Writer that writes to a Cloud object
		// associated with this backing Store object.
		//
		// A new object will be created if an object with this name already exists.
		// Otherwise any previous object with the same name will be replaced.
		// The object will not be available (and any previous object will remain)
		// until Close has been called
		NewWriter(o string, metadata map[string]string) (io.WriteCloser, error)

however when using the localfs type, it appears the file is not truncated

What do you think ?

@araddon
Copy link
Contributor

araddon commented May 10, 2018

thanks for the report, and great write-up, will try to get some unit tests etc and address this soon.

@epsniff
Copy link
Contributor

epsniff commented May 11, 2018

yep, thats a bug..

@epsniff
Copy link
Contributor

epsniff commented May 11, 2018

@araddon Ill take this one, I should have a PR up tomorrow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants