News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

r11164 - Can't save "Cannot open target file for writing"

Started by limyx826, May 06, 2024, 05:13:35 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

limyx826

I think the save menu is missing something.
Screenshot 2024-05-06 011105.png

prissi

Seems ok, nothing saved yet.

Or is this a double-byte character 1?

Or I would need more info what you expected to see. Also please state OS, under Windows it was working fine.

Andarix

Windows

I had manually installed into a new folder and then set singleuser_install = 1.

I created the save folder before starting. However, not the screenshot folder. I couldn't save screenshots then.

The folder creation probably doesn't work.

limyx826

Quote from: prissi on May 06, 2024, 06:25:21 AMSeems ok, nothing saved yet.

Or is this a double-byte character 1?

Or I would need more info what you expected to see. Also please state OS, under Windows it was working fine.
Well I am using SDL2 64 bit client on Windows 10 22H2 64 bit build 19045.4291 if necessary. The auto save when quit works but manual saving will pop up error message as shown below. No matter which pakset I use it's the same error message.
Screenshot 2024-05-06 132523.pngScreenshot 2024-05-06 132714.png

limyx826

Quote from: Andarix on May 06, 2024, 08:22:34 AMI created the save folder before starting. However, not the screenshot folder. I couldn't save screenshots then.
I also tested screenshot and here's the result.
Screenshot 2024-05-06 135017.png

limyx826

Turns out that the Simutrans user directory is bugged. The Folder creation is not working as mentioned by Andradix, after I manually created save and screenshot folder in ~\Documents\simutrans\ then I can save and screenshot normally. I not sure any features that use user directory that had similar requirements but I assume all of them is bugged in the same matter.

ceeac

Quote from: Andarix on May 06, 2024, 08:22:34 AMThe folder creation probably doesn't work.

Yeah, dr_mkdir is likely broken on Windows because SHCreateDirectory returns an error for relative paths
(https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shcreatedirectory)

prissi

Nice, it still return 0 meaning success and not ERROR_BAD_PATHNAME ...

It seems I need to make a new release this weekend with all those errors.