-
Notifications
You must be signed in to change notification settings - Fork 346
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
InternalStreamReader FileAccess to ReadWrite #343
Comments
I'll be honest, I'm surprised that works given that Excel has a write lock already on it. My text editors that handle locking (marking the file as readonly) for most scenarios won't even open an Excel locked file.
The only concern I would have is when another process has the ability to write to a file we are trying to read, that could lead to data corruption issues in what we are trying to read. So given this I, personally, wouldn't feel it's correct use that by default in most scenario's. Links to what I read, though these are the .NET Framework, I think the same would apply to core.
|
I'm not sure if I understand the suggestion: are you suggesting to change
Matthias |
No, I think he was after the row below, FileShare to be read/write, so that other files can have a write lock. |
Thank you for your clarification. It is included. |
Based on Issue #248, is there a reason not to change the FileStream Constructor to use FileShare.ReadWrite? I know i could use a Stream directly to avoid errors while Excel locks the file, but i whould think Reading should not be stopped because someone forgot to close the file. I try´d it with this Option and have no negative impacts other than "The File could be changed by Excel while reading", that is the only downside i can think of.
The text was updated successfully, but these errors were encountered: