]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
test: Simplify get_root()
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 10 Sep 2025 16:49:29 +0000 (18:49 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 10 Sep 2025 16:49:29 +0000 (18:49 +0200)
unittest/test_argprocessing.cpp

index 41c5d46b898fbd59f41d1b21bd931f0711080b10..8454058a105b5fa76d5769fb85a9b61ad35ca4f7 100644 (file)
@@ -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