diff options
| author | Brennan Vincent <brennan@umanwizard.com> | 2024-09-23 07:21:07 -0400 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2024-11-17 23:15:49 +0100 |
| commit | cf10268a7783207aec30e0169b61362df0d2512d (patch) | |
| tree | 070e7e174d18ce66c55ee3b562fe54f76036ed2e /nix | |
| parent | b2458247194a54c251618a0b9e8be26558ecfd41 (diff) | |
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>
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/libstore/store-api.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 781fb9e693d..38a1403a712 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc | |||
| @@ -61,7 +61,7 @@ void checkStoreName(const string & name) | |||
| 61 | /* Disallow names starting with a dot for possible security | 61 | /* Disallow names starting with a dot for possible security |
| 62 | reasons (e.g., "." and ".."). */ | 62 | reasons (e.g., "." and ".."). */ |
| 63 | if (string(name, 0, 1) == ".") | 63 | if (string(name, 0, 1) == ".") |
| 64 | throw Error(format("invalid name: `%1%'") % name); | 64 | throw Error(format("invalid name: `%1%' (can't begin with dot)") % name); |
| 65 | foreach (string::const_iterator, i, name) | 65 | foreach (string::const_iterator, i, name) |
| 66 | if (!((*i >= 'A' && *i <= 'Z') || | 66 | if (!((*i >= 'A' && *i <= 'Z') || |
| 67 | (*i >= 'a' && *i <= 'z') || | 67 | (*i >= 'a' && *i <= 'z') || |
