-
Notifications
You must be signed in to change notification settings - Fork 179
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
DiskShare.openFile(...) seems to delete the files contents by default?! #786
Comments
Thumbs up as this made me spend a lot of time until I came across this issue: #166 |
Its certainly quite unique in my 45 years or so in this business: |
hierynomus
added a commit
that referenced
this issue
Sep 25, 2023
Signed-off-by: Jeroen van Erp <[email protected]>
I've merged a fix to the |
XayahSuSuSu
added a commit
to XayahSuSuSu/Android-DataBackup
that referenced
this issue
Jun 29, 2024
* Ref: hierynomus/smbj#786 Change-Id: Id7298e852abc81dd2836b042638bd5fd8576e966
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When opening a file, the default
SMB2CreateDisposition
seems to be to delete its contents.Thats scary!
As far as I can see, the default is
SMB2CreateDisposition.FILE_SUPERSEDE
.A couple of Issues.:
SMB2CreateDisposition.FILE_OPEN
.Then a file would only be created or overwritten if explicitly requested.
That would seem to be the safest.
My code follows below...
All the best,
Dave
The text was updated successfully, but these errors were encountered: