We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Filesystem::getBaseDir
1 parent 76a1ce2 commit 82a0aceCopy full SHA for 82a0ace
library/modules/Filesystem.cpp
@@ -238,7 +238,8 @@ std::filesystem::path Filesystem::getInstallDir() noexcept
238
std::filesystem::path Filesystem::getBaseDir() noexcept
239
{
240
auto getsavebase = []() {
241
- if (df::global::init->media.flag.is_set(df::enums::init_media_flags::PORTABLE_MODE))
+ // assume portable mode is _on_ if init is missing
242
+ if (!df::global::init || df::global::init->media.flag.is_set(df::enums::init_media_flags::PORTABLE_MODE))
243
return DFSDL::DFSDL_GetBasePath();
244
else
245
return DFSDL::DFSDL_GetPrefPath("Bay 12 Games", "Dwarf Fortress");
0 commit comments