aboutsummaryrefslogtreecommitdiff
path: root/src/libexpr/primops/flakeref.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2019-05-01 20:38:41 +0200
committerEelco Dolstra <edolstra@gmail.com>2019-05-01 20:44:30 +0200
commita37436d7929f37fb390837419d166a81559abb3e (patch)
treec867b8c67a1b68a0a02456c78e6b02bcfaf769e2 /src/libexpr/primops/flakeref.cc
parentfa88f7152070d4c886b512de00691da709bc7229 (diff)
Accept empty directories
Diffstat (limited to 'src/libexpr/primops/flakeref.cc')
-rw-r--r--src/libexpr/primops/flakeref.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libexpr/primops/flakeref.cc b/src/libexpr/primops/flakeref.cc
index 56ba58d09..b7a20a170 100644
--- a/src/libexpr/primops/flakeref.cc
+++ b/src/libexpr/primops/flakeref.cc
@@ -107,7 +107,7 @@ FlakeRef::FlakeRef(const std::string & uri, bool allowRelative)
throw Error("invalid Git ref '%s'", value);
ref = value;
} else if (name == "dir") {
- if (!std::regex_match(value, subDirRegex2))
+ if (value != "" && !std::regex_match(value, subDirRegex2))
throw Error("flake '%s' has invalid subdirectory '%s'", uri, value);
subdir = value;
} else