mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-26 23:57:03 +02:00
[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>
This commit is contained in:
parent
e75ecfd4a0
commit
1b1e186a58
1 changed files with 6 additions and 8 deletions
|
|
@ -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)) {
|
auto& instance = PathManagerImpl::GetInstance();
|
||||||
LOG_ERROR(Common_Filesystem, "Filesystem object at new_path={} is not a directory",
|
if (FS::IsDir(new_path)) {
|
||||||
PathToUTF8String(new_path));
|
instance.SetEdenPathImpl(eden_path, new_path);
|
||||||
return;
|
} 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…
Add table
Add a link
Reference in a new issue