fix(libc): the process starts in the root directory again

Starting in app0 when the folder exists made the working directory, and with it the tests, depend
on the layout next to the executable. The title opens its files by absolute /app0 paths, so the
fallback was never used: the route to story mode runs the same without it.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
STL1te
2026-09-30 11:15:29 +03:00
parent 9cfdbff17c
commit 3a76b18646
+1 -1
View File
@@ -53,7 +53,7 @@ std::optional<std::filesystem::path> ResolveAlias(const std::string& guestPath)
struct WorkingDirectory {
std::mutex mutex;
const std::filesystem::path root = std::filesystem::canonical(std::filesystem::current_path());
std::filesystem::path current = std::filesystem::is_directory(root / "app0") ? root / "app0" : root;
std::filesystem::path current = root;
};
WorkingDirectory& Directories() { static WorkingDirectory state; return state; }
std::filesystem::path Resolve(WorkingDirectory& state, const char* path) {