Browse Source

[fs] fix paths not being created due to instance not existing yet (#3134)

basically a check runs that depends on the instance being created, but instance isnt created yet so check fails
Signed-off-by: lizzie <lizzie@eden-emu.dev>

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3134
Reviewed-by: Caio Oliveira <caiooliveirafarias0@gmail.com>
Reviewed-by: crueter <crueter@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
vk-fix-oom-force-maller-buffers
lizzie 3 weeks ago
committed by crueter
parent
commit
1b1e186a58
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 14
      src/common/fs/path_util.cpp

14
src/common/fs/path_util.cpp

@ -294,17 +294,15 @@ std::string GetLegacyPathString(EmuPath legacy_path) {
} }
void SetEdenPath(EdenPath eden_path, const fs::path& new_path) { void SetEdenPath(EdenPath eden_path, const fs::path& new_path) {
if (!FS::IsDir(new_path)) {
LOG_ERROR(Common_Filesystem, "Filesystem object at new_path={} is not a directory",
PathToUTF8String(new_path));
return;
auto& instance = PathManagerImpl::GetInstance();
if (FS::IsDir(new_path)) {
instance.SetEdenPathImpl(eden_path, new_path);
} else {
LOG_ERROR(Common_Filesystem, "Filesystem object at new_path={} is not a directory", PathToUTF8String(new_path));
} }
PathManagerImpl::GetInstance().SetEdenPathImpl(eden_path, new_path);
} }
void CreateEdenPaths()
{
void CreateEdenPaths() {
PathManagerImpl::GetInstance().CreateEdenPaths(); PathManagerImpl::GetInstance().CreateEdenPaths();
} }

Loading…
Cancel
Save