mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 19:00:17 +02:00
FEXQonfig: Fix loading local config files by command line argument
ParentPath doesn't return a usable value for "Config.json", so just use std::filesystem::absolute/parent_path instead.
This commit is contained in:
1 parent
463a0b5ed4
commit
de9ab6a023
1 file changed
+2
-1
@@ -169,7 +169,8 @@ static void ConfigInit(fextl::string ConfigFilename) {
|
||||
|
||||
// Ensure config and RootFS directories exist
|
||||
std::error_code ec {};
|
||||
fextl::string Dirs[] = {FHU::Filesystem::ParentPath(ConfigFilename), FEXCore::Config::GetDataDirectory() + "RootFS/"};
|
||||
std::filesystem::path Dirs[] = {std::filesystem::absolute(ConfigFilename).parent_path(),
|
||||
std::filesystem::absolute(FEXCore::Config::GetDataDirectory()) / "RootFS/"};
|
||||
for (auto& Dir : Dirs) {
|
||||
bool created = std::filesystem::create_directories(Dir, ec);
|
||||
if (created) {
|
||||
|
||||
Reference in new issue
Block a user