Skip to content

CSFile Windows creation file mode fix#1205

Merged
cbnolok merged 3 commits intoSphereserver:masterfrom
Te-Rha:master
Jan 31, 2024
Merged

CSFile Windows creation file mode fix#1205
cbnolok merged 3 commits intoSphereserver:masterfrom
Te-Rha:master

Conversation

@DavideRei
Copy link
Copy Markdown
Contributor

The correct mode to create a file in Windows, if not exists, and open it, if exists, is CREATE_ALWAYS. With (OPEN_ALWAYS | CREATE_NEW) the mode is set to 5 (TRUNCATE_EXISTING) and if the file doesn't exists the CreateFile function return an error. https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea

The correct mode to create a file, if not exists, and open it, if exists, is CREATE_ALWAYS. With (OPEN_ALWAYS | CREATE_NEW) the mode is set to 5 (TRUNCATE_EXISTING) and if the file doesn't exists the CreateFile function return an error.
https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfilea
Added new file permissions
@DavideRei
Copy link
Copy Markdown
Contributor Author

DavideRei commented Jan 11, 2024

added creation file fix for Linux.
Create a new file require the file permissions

@DavideRei
Copy link
Copy Markdown
Contributor Author

added fix for #1206
When changing the body/id of a char update the dispid

@Jhobean
Copy link
Copy Markdown
Contributor

Jhobean commented Jan 12, 2024

Tested the dispid Part and now it work fine! Thx. ABout the CSfile, I don't know

@cbnolok cbnolok merged commit 646b9d1 into Sphereserver:master Jan 31, 2024
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