The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: thfr on January 19, 2024, 12:58:19 AM

Title: mkdir before chdir in pakinstaller
Post by: thfr on January 19, 2024, 12:58:19 AM
This diff fixes running the pakinstaller (the menu for downloading paksets on first launch if none are present) on OpenBSD where I'm developing a port of simutrans. Before this patch, running simutrans without a pre-existing directory
~/simutrans/ would fail on first run (not second because the directory exists then). Also fixes the downloading of other/multiple paksets. An alternative approach would be to include mkdir in dr_chdir, and/or error handling for dr_chdir.

Fixes things on OpenBSD, but the solution should apply to *nix (Linux, other BSDs).
Title: Re: mkdir before chdir in pakinstaller
Post by: prissi on January 19, 2024, 02:53:59 AM
Thank you, included.