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.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/other_tools/utils/parse_archive.cpp b/src/other_tools/utils/parse_archive.cpp
index fb03309a..267d2d2d 100644
--- a/src/other_tools/utils/parse_archive.cpp
+++ b/src/other_tools/utils/parse_archive.cpp
@@ -121,6 +121,13 @@ auto ParseArchiveDescription(ExpressionPtr const& repo_desc,
? repo_desc_subdir->String()
: "")
.lexically_normal();
+ if (subdir.is_absolute()) {
+ (*logger)(fmt::format("ArchiveCheckout: Expected field \"subdir\" to "
+ "be a relative path, but found {}",
+ subdir.string()),
+ /*fatal=*/true);
+ return std::nullopt;
+ }
// check "special" pragma
auto repo_desc_pragma = repo_desc->At("pragma");