aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops.cc
diff options
context:
space:
mode:
authorShea Levy <shea@shealevy.com>2024-01-11 07:21:16 -0500
committerShea Levy <shea@shealevy.com>2024-01-11 07:21:16 -0500
commitba48ab4b954dd1c8af388d1c5a33bbd62373c6f5 (patch)
treef17f8492bed32f78c04d9d4e9ffd2b672af85943 /src/libexpr/primops.cc
parente7c2b35827e9f4ddbec4248c5cf1ad793a2988ad (diff)
parent4dd5171652018e29bf9e496522df3be51d615a2c (diff)
Merge branch '2.18-maintenance' into ifd-buildStore-2.18
Diffstat (limited to 'src/libexpr/primops.cc')
-rw-r--r--src/libexpr/primops.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index ef2d7e768..c2f6609f4 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -1536,7 +1536,9 @@ static void prim_pathExists(EvalState & state, const PosIdx pos, Value * * args,
auto path = realisePath(state, pos, arg, { .checkForPureEval = false });
/* SourcePath doesn't know about trailing slash. */
- auto mustBeDir = arg.type() == nString && arg.str().ends_with("/");
+ auto mustBeDir = arg.type() == nString
+ && (arg.str().ends_with("/")
+ || arg.str().ends_with("/."));
try {
auto checked = state.checkSourcePath(path);