Skip to content

Commit

Permalink
Revert "cleo path is relative (#193)"
Browse files Browse the repository at this point in the history
This reverts commit 3f917f1.
  • Loading branch information
MiranDMC committed Sep 16, 2024
1 parent c9aef46 commit a558209
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions source/CScriptEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -708,15 +708,12 @@ namespace CLEO
if(customWorkDir != nullptr)
fsPath = ResolvePath(customWorkDir) / fsPath;
else
fsPath = GetWorkDir() / fsPath;

auto resolved = FS::weakly_canonical(fsPath).string();

// ModLoader support: do not expand game dir relative paths
if (resolved.find(Filepath_Root) == 0)
return FS::relative(resolved, Filepath_Root).string();
else
return resolved;
{
if (Filepath_Root.compare(GetWorkDir()) != 0) // ModLoader support: do not expand game dir relative paths
{
fsPath = GetWorkDir() / fsPath;
}
}
}

return FS::weakly_canonical(fsPath).string();
Expand Down

0 comments on commit a558209

Please sign in to comment.