(filesystem): Return correct working directory

This commit is contained in:
Diavolo 2022-08-07 21:11:17 +02:00
parent 98258080af
commit b847bc6330
No known key found for this signature in database
GPG Key ID: FA77F074E98D98A5

View File

@ -73,6 +73,12 @@ namespace filesystem
return true;
}
const char* sys_default_install_path_stub()
{
static auto current_path = std::filesystem::current_path().string();
return current_path.data();
}
}
std::string read_file(const std::string& path)
@ -198,6 +204,7 @@ namespace filesystem
void post_unpack() override
{
utils::hook::call(0x14060B052, fs_startup_stub);
utils::hook::jump(0x140624050, sys_default_install_path_stub);
}
};
}