Skip to content

Commit 8e20fbd

Browse files
committed
canonicalize hack path at init
1 parent e2bbfc9 commit 8e20fbd

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

library/Hooks.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ DFhackCExport void dfhooks_init() {
2525
}
2626

2727
// we need to init DF globals before we can check the commandline
28-
if (!DFHack::Core::getInstance().InitMainThread(basepath) || !df::global::game) {
28+
if (!DFHack::Core::getInstance().InitMainThread(std::filesystem::canonical(basepath)) || !df::global::game) {
2929
// we don't set disabled to true here so symbol generation can work
3030
return;
3131
}

library/include/Hooks.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ distribution.
2626

2727
union SDL_Event;
2828

29+
DFhackCExport void dfhooks_preinit(std::filesystem::path dllpath);
2930
DFhackCExport void dfhooks_init();
3031
DFhackCExport void dfhooks_shutdown();
3132
DFhackCExport void dfhooks_update();

0 commit comments

Comments
 (0)