Add: always set PERSONAL_DIR "/content_download" in search path (#8481)

This means that if you start OpenTTD with "-c" to indicate another
location to store files, it can still read the content you already
downloaded from your PERSONAL_DIR. This folder is, however,
read-only.

This is useful for situations where you downloaded OpenGFX via
the content-service, but want to run the regression or want to
run with a clean configuration. With this change, you no longer
need to download OpenGFX again.
This commit is contained in:
Patric Stout
2021-01-03 11:10:56 +01:00
committed by GitHub
parent 8c24b2b6ce
commit ab7da117e0
3 changed files with 20 additions and 3 deletions

View File

@@ -466,6 +466,10 @@ void DetermineBasePaths(const char *exe)
tmp += PERSONAL_DIR;
AppendPathSeparator(tmp);
_searchpaths[SP_PERSONAL_DIR] = tmp;
tmp += "content_download";
AppendPathSeparator(tmp);
_searchpaths[SP_AUTODOWNLOAD_PERSONAL_DIR] = tmp;
} else {
_searchpaths[SP_PERSONAL_DIR].clear();
}