From cf10268a7783207aec30e0169b61362df0d2512d Mon Sep 17 00:00:00 2001 From: Brennan Vincent Date: Mon, 23 Sep 2024 07:21:07 -0400 Subject: daemon: Improve error message in ‘checkStoreName’. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * nix/libstore/store-api.cc (checkStoreName): Clarify message when NAME starts with a dot. Change-Id: I045a663bc6cd9844677c65b38a31d3941cf212b5 Signed-off-by: Ludovic Courtès --- nix/libstore/store-api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/libstore/store-api.cc b/nix/libstore/store-api.cc index 781fb9e693..38a1403a71 100644 --- a/nix/libstore/store-api.cc +++ b/nix/libstore/store-api.cc @@ -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') || -- cgit 1.4.1