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

Explicitly specifying FileShare.Read attribute when opening log stream #72

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

zoka-cz
Copy link
Contributor

@zoka-cz zoka-cz commented Oct 15, 2024

Using the library on iPhone (Xamarin) it appears, that the mention in #65

FileShare is not specified but by default it is FileShare.Read which allows other processes to open the file for 'read'.

is not true for iPhone. When opening the file for read, which is currently in use by FileLogger it throws the sharing violation. With this pull request it does not.
I believe that this PR does not break anything else as FileShare.Read should be default option in other than iOS implementation.

@VitaliyMF
Copy link
Contributor

VitaliyMF commented Oct 21, 2024

It is strange that such basic API like FileStream contstructor may have different FileShare defaults.

This change should not break compatibility for .NET Framework / .NET Core / NET6-9.

@VitaliyMF VitaliyMF merged commit 83558ad into nreco:master Oct 21, 2024
1 check passed
@zoka-cz
Copy link
Contributor Author

zoka-cz commented Oct 21, 2024

Do you plan to release the Nuget soon, which would include this PR?
Whether should I reference Nuget (preferred) or my forked source code.

@VitaliyMF
Copy link
Contributor

@zoka-cz sorry, I accedentally missed your question!

Already shipped in 1.2.2

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 this pull request may close these issues.

3 participants