diff options
author | Robert Hensing <robert@roberthensing.nl> | 2024-01-27 11:18:03 +0100 |
---|---|---|
committer | eldritch horrors <pennae@lix.systems> | 2024-05-02 18:53:51 +0200 |
commit | 3a058dc4b3f7a8d3f131f2031bf348788ce9206c (patch) | |
tree | 9202bee5e9d5e6ed6a99ae7df41c2dc9dd96706d /src/libstore | |
parent | e2ab89a74b1d6044cea91e91f5c3d5fce203c2e8 (diff) |
Revert "StorePath: reject names starting with '.'"
This reverts commit 24bda0c7b381e1a017023c6f7cb9661fae8560bd.
(cherry picked from commit 9ddd0f2af8fd95e1380027a70d0aa650ea2fd5e4)
Change-Id: Ideb547e2a8ac911cf39d58d3e0c1553867bdd776
Diffstat (limited to 'src/libstore')
-rw-r--r-- | src/libstore/path-regex.hh | 2 | ||||
-rw-r--r-- | src/libstore/path.cc | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/src/libstore/path-regex.hh b/src/libstore/path-regex.hh index a44e6a2eb..4f8dc4c1f 100644 --- a/src/libstore/path-regex.hh +++ b/src/libstore/path-regex.hh @@ -3,6 +3,6 @@ namespace nix { -static constexpr std::string_view nameRegexStr = R"([0-9a-zA-Z\+\-_\?=][0-9a-zA-Z\+\-\._\?=]*)"; +static constexpr std::string_view nameRegexStr = R"([0-9a-zA-Z\+\-\._\?=]+)"; } diff --git a/src/libstore/path.cc b/src/libstore/path.cc index 2f929b7b3..0c86d223c 100644 --- a/src/libstore/path.cc +++ b/src/libstore/path.cc @@ -11,8 +11,6 @@ static void checkName(std::string_view path, std::string_view name) if (name.size() > StorePath::MaxPathLen) throw BadStorePath("store path '%s' has a name longer than %d characters", path, StorePath::MaxPathLen); - if (name[0] == '.') - throw BadStorePath("store path '%s' starts with illegal character '.'", path); // See nameRegexStr for the definition for (auto c : name) if (!((c >= '0' && c <= '9') |