Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
53 stars 40 forks source link

CSFile Windows creation file mode fix #1205

Closed DavideRei closed 4 months ago

DavideRei commented 5 months ago

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

DavideRei commented 5 months ago

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

DavideRei commented 5 months ago

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

Jhobean commented 5 months ago

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