Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

FileStream should not truncate files when opening fails. #14043

Merged
merged 1 commit into from
Sep 22, 2017

Conversation

poizan42
Copy link

Truncate at the end of initialization if required by the filemode instead. Fixes dotnet/corefx#24081

@poizan42
Copy link
Author

@chlowell @stephentoub

@stephentoub
Copy link
Member

Thanks, @poizan42. This seems reasonable. Could you put up a PR for one or more tests in corefx that'll fail before this change and succeed after?

cc: @JeremyKuhne

@stephentoub
Copy link
Member

Also, is there any measurable perf difference that stems from having the extra call?

poizan42 added a commit to poizan42/corefx that referenced this pull request Sep 20, 2017
@poizan42
Copy link
Author

PR for test: dotnet/corefx#24163

Copy link

@pjanotti pjanotti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @poizan42 LGTM

@pjanotti pjanotti merged commit 555f436 into dotnet:master Sep 22, 2017
@pjanotti
Copy link

Thanks for your contribution @poizan42.

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

Successfully merging this pull request may close these issues.

6 participants