mirror of https://github.com/OpenTTD/OpenTTD
parent
6175a6b78a
commit
78c7dd1303
|
@ -822,11 +822,11 @@ void DetermineBasePaths(const char *exe)
|
|||
if (end == std::string::npos) {
|
||||
/* _config_file is not in a folder, so use current directory. */
|
||||
tmp = cwd;
|
||||
AppendPathSeparator(tmp);
|
||||
_searchpaths[SP_WORKING_DIR] = tmp;
|
||||
} else {
|
||||
_searchpaths[SP_WORKING_DIR] = _config_file.substr(0, end + 1);
|
||||
tmp = FS2OTTD(std::filesystem::weakly_canonical(std::filesystem::path(OTTD2FS(_config_file))).parent_path());
|
||||
}
|
||||
AppendPathSeparator(tmp);
|
||||
_searchpaths[SP_WORKING_DIR] = tmp;
|
||||
}
|
||||
|
||||
/* Change the working directory to that one of the executable */
|
||||
|
|
Loading…
Reference in New Issue