mirror of
https://github.com/NixOS/nix
synced 2025-07-05 20:41:47 +02:00
Revert "StorePath: reject names starting with '.'"
This reverts commit 24bda0c7b3
.
This commit is contained in:
parent
b83a2fb6dd
commit
9ddd0f2af8
4 changed files with 3 additions and 10 deletions
|
@ -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\+\-\._\?=]+)";
|
||||
|
||||
}
|
||||
|
|
|
@ -9,8 +9,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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue