New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong determination of personal directory #7311
Comments
I discovered the following (the line numbers are the ones of some added
Why is Line 1224 in 7784d77
|
Hmm, yes, If the config path is overridden (as it is for regression testing) then we ignore the XDG directories. I'm not sure why... |
I am not even talking about the XDG directories, here: Moreover, if |
This issue has been automatically marked as stale because it has not had any activity in the last two months. |
? |
Could this issue be kept open until associated PR is dealt with? |
One of the key behaviours of the "-c" option is: When OpenTTD writes files without user interaction for selecting a location, it only writes files relative to the config file (i.e. relative to the -c directory). This includes autosaves, screenshots and download content. That is, it is intended behaviour that SP_AUTODOWNLOAD_DIR refers to the directory of the "-c" option: So, this issue boils down to
Two possible solutions:
|
Version of OpenTTD
Tested on trunk 90a4737
Some calls to the
DEBUG
macro have been added to track the problem down & produce the output pastes that follow.Expected result
Normal game runs fine after OpenGRF baseset has been downloaded from ingame, and thus resides in
~/.openttd/content_download/baseset/
The regression test execution should find it aswell.
A patched regression run (one where the custom configuration file
-c ai/regression/regression.cfg
has been removed) shows as follow:No error is reported.
Actual result
Regression test execution fails to find the OpenGRF archive, which yields an error.
Moreover, debug output shows the following:
Steps to reproduce
Execute
make regression
on LinuxTo showcase the run not failing to find the baseset, edit
bin/ai/regression/run.sh
to remove the-c ai/regression/regression.cfg
argument to the call toopenttd
.Quick analysis
The following lines of
fileio.cpp
determine theconfig_dir
variable content:Then, the following line replicate
config_dir
in_personal_dir
, which looks problematic:The text was updated successfully, but these errors were encountered: