@@ -124,7 +124,7 @@ namespace DFHack {
124124
125125 static const std::filesystem::path getConfigDefaultsPath ()
126126 {
127- return Filesystem::getInstallDir () / " hack " / " data" / " dfhack-config-defaults" ;
127+ return Core::getInstance (). getHackPath () / " data" / " dfhack-config-defaults" ;
128128 };
129129
130130class MainThread {
@@ -492,7 +492,7 @@ void Core::getScriptPaths(std::vector<std::filesystem::path> *dest)
492492 if (save.size ())
493493 dest->emplace_back (df_pref_path / " save" / save / " scripts" );
494494 }
495- dest->emplace_back (df_install_path / " hack " / " scripts" );
495+ dest->emplace_back (getHackPath () / " scripts" );
496496 for (auto & path : script_paths[2 ])
497497 dest->emplace_back (path);
498498 for (auto & path : script_paths[1 ])
@@ -1054,7 +1054,7 @@ void Core::fatal (std::string output, const char * title)
10541054
10551055std::filesystem::path Core::getHackPath ()
10561056{
1057- return p-> getPath () / " hack" ;
1057+ return Filesystem::get_initial_cwd () / " hack" ;
10581058}
10591059
10601060df::viewscreen * Core::getTopViewscreen () {
@@ -1099,16 +1099,12 @@ bool Core::InitMainThread() {
10991099 }
11001100
11011101 // find out what we are...
1102- #ifdef LINUX_BUILD
1103- const char * path = " hack/symbols.xml" ;
1104- #else
1105- const char * path = " hack\\ symbols.xml" ;
1106- #endif
1102+ std::filesystem::path symbols_path = getHackPath () / " symbols.xml" ;
11071103 auto local_vif = std::make_unique<DFHack::VersionInfoFactory>();
11081104 std::cerr << " Identifying DF version.\n " ;
11091105 try
11101106 {
1111- local_vif->loadFile (path );
1107+ local_vif->loadFile (symbols_path );
11121108 }
11131109 catch (Error::All & err)
11141110 {
0 commit comments