From: Joel Rosdahl Date: Wed, 10 Sep 2025 16:49:29 +0000 (+0200) Subject: test: Simplify get_root() X-Git-Tag: v4.12~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d593a7dd64cfdaed9c98ae44dbacc45bf880a8f;p=thirdparty%2Fccache.git test: Simplify get_root() --- diff --git a/unittest/test_argprocessing.cpp b/unittest/test_argprocessing.cpp index 41c5d46b..8454058a 100644 --- a/unittest/test_argprocessing.cpp +++ b/unittest/test_argprocessing.cpp @@ -42,18 +42,14 @@ using util::Args; namespace { -std::string +fs::path get_root() { -#ifndef _WIN32 - return "/"; -#else auto cwd = fs::current_path(); if (!cwd) { FAIL("get_root failed: ", cwd.error()); } - return cwd->root_path().generic_u8string(); -#endif + return cwd->root_path(); } } // namespace