summaryrefslogtreecommitdiff
path: root/src/other_tools/utils/parse_archive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/other_tools/utils/parse_archive.cpp')
-rw-r--r--src/other_tools/utils/parse_archive.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/other_tools/utils/parse_archive.cpp b/src/other_tools/utils/parse_archive.cpp
index 267d2d2d..72ed5c5d 100644
--- a/src/other_tools/utils/parse_archive.cpp
+++ b/src/other_tools/utils/parse_archive.cpp
@@ -18,6 +18,7 @@
#include "fmt/core.h"
#include "src/buildtool/crypto/hash_info.hpp"
+#include "src/utils/cpp/path.hpp"
auto ParseArchiveContent(ExpressionPtr const& repo_desc,
std::string const& origin)
@@ -121,9 +122,9 @@ auto ParseArchiveDescription(ExpressionPtr const& repo_desc,
? repo_desc_subdir->String()
: "")
.lexically_normal();
- if (subdir.is_absolute()) {
+ if (not PathIsNonUpwards(subdir)) {
(*logger)(fmt::format("ArchiveCheckout: Expected field \"subdir\" to "
- "be a relative path, but found {}",
+ "be a non-upwards path, but found {}",
subdir.string()),
/*fatal=*/true);
return std::nullopt;