mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-18 13:36:36 +01:00
daemon: Improve error message in ‘checkStoreName’.
* nix/libstore/store-api.cc (checkStoreName): Clarify message when NAME starts with a dot. Change-Id: I045a663bc6cd9844677c65b38a31d3941cf212b5 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
b245824719
commit
cf10268a77
1 changed files with 1 additions and 1 deletions
|
@ -61,7 +61,7 @@ void checkStoreName(const string & name)
|
|||
/* Disallow names starting with a dot for possible security
|
||||
reasons (e.g., "." and ".."). */
|
||||
if (string(name, 0, 1) == ".")
|
||||
throw Error(format("invalid name: `%1%'") % name);
|
||||
throw Error(format("invalid name: `%1%' (can't begin with dot)") % name);
|
||||
foreach (string::const_iterator, i, name)
|
||||
if (!((*i >= 'A' && *i <= 'Z') ||
|
||||
(*i >= 'a' && *i <= 'z') ||
|
||||
|
|
Loading…
Reference in a new issue