From 0bead5006510bcacf908a60ee392ef82fb86baa5 Mon Sep 17 00:00:00 2001 From: Exzap <13877693+Exzap@users.noreply.github.com> Date: Thu, 15 Jun 2023 21:19:38 +0200 Subject: [PATCH] coreinit: Implement support for ".." in paths --- src/Cafe/IOSU/fsa/iosu_fsa.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/Cafe/IOSU/fsa/iosu_fsa.cpp b/src/Cafe/IOSU/fsa/iosu_fsa.cpp index 2c23ea71..e194f96d 100644 --- a/src/Cafe/IOSU/fsa/iosu_fsa.cpp +++ b/src/Cafe/IOSU/fsa/iosu_fsa.cpp @@ -108,14 +108,30 @@ namespace iosu if ((input.size() - idx) >= 3 && input[idx + 1] == '.' && input[idx + 2] == '/') { // "../" - cemu_assert_unimplemented(); + while(!tmp.empty()) + { + if(tmp.back() == '/') + { + tmp.pop_back(); + break; + } + tmp.pop_back(); + } idx += 3; continue; } else if ((input.size() - idx) == 2 && input[idx + 1] == '.') { // ".." at the end - cemu_assert_unimplemented(); + while(!tmp.empty()) + { + if(tmp.back() == '/') + { + tmp.pop_back(); + break; + } + tmp.pop_back(); + } idx += 2; continue; }