diff --git a/lib/library.cpp b/lib/library.cpp index f74b000edb2..6c47ca71df5 100644 --- a/lib/library.cpp +++ b/lib/library.cpp @@ -102,14 +102,14 @@ Library::Error Library::load(const char exename[], const char path[]) } std::list cfgfolders; -#ifdef FILESDIR - cfgfolders.emplace_back(FILESDIR "/cfg"); -#endif if (exename) { const std::string exepath(Path::fromNativeSeparators(Path::getPathFromFilename(exename))); cfgfolders.push_back(exepath + "cfg"); cfgfolders.push_back(exepath); } +#ifdef FILESDIR + cfgfolders.emplace_back(FILESDIR "/cfg"); +#endif while (error == tinyxml2::XML_ERROR_FILE_NOT_FOUND && !cfgfolders.empty()) { const std::string cfgfolder(cfgfolders.back());