diff options
author | Patric Stout <truebrain@openttd.org> | 2020-12-09 00:02:39 +0100 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2020-12-13 16:40:56 +0100 |
commit | da7c74ba7e8a89ca4e099522a8ab3564a2f1f3df (patch) | |
tree | c95ab8d40743bc887ff97b77a8ec2ea4cf13896a /src/os/os2 | |
parent | 4e12aac9c0609f7a42d397106d102ad3367598bd (diff) | |
download | openttd-da7c74ba7e8a89ca4e099522a8ab3564a2f1f3df.tar.xz |
Fix: change the working-dir searchpath when using '-c'
Basically, with '-c' you now create a sandbox. It will still use
your personal-dir and global-dir to find files you installed there,
but all new files are stored with a base folder identical to the
folder the configuration is in.
This is a bit of an old bug, that we many have tried to solve in
various of different ways. The code has grown sufficiently complex
that it is hard to see what consequences of actions are. This is
in my opinion the most harmless solution, while increasing the
usefulness of the '-c' flag.
In essence, the problem was that empty folders were always created
in the directory where the configuration was, but as that directory
wasn't added to any searchpath, files weren't stored there, unless
by accident it was a folder already on the searchpath. For example,
if you do './openttd -c local.cfg', it did work as expected. But
in the more generic variant, it did not.
With this patch, you can run './openttd -c /new/folder/local.cfg',
and it will create and prepare that folder to receive new files.
'content_download' is also stored in the directory the
configuration is in; this was already the case. Important to
note that there is only one search-path for 'content_download'.
In other words, when using '-c', it will not look in '~/.openttd'
inside the 'content_download' folder.
Diffstat (limited to 'src/os/os2')
0 files changed, 0 insertions, 0 deletions