mirror of
https://github.com/NixOS/nix.git
synced 2025-11-28 05:00:58 +01:00
Revert "StorePath: reject names starting with '.'"
This reverts commit 24bda0c7b3.
This commit is contained in:
parent
d137077271
commit
379274fd7f
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\+\-\._\?=]+)";
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue