From 1d593a7dd64cfdaed9c98ae44dbacc45bf880a8f Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Wed, 10 Sep 2025 18:49:29 +0200 Subject: [PATCH] test: Simplify get_root() --- unittest/test_argprocessing.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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 -- 2.47.3