1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 06:31:14 +02:00

libutil: Use correct argument to Error format ctor

It seems that the intention was to format a number in base 8 (as
suggested by the %o format specifier), but `perms` is a `std::string`
and not a number. Looks like `rawMode` is the correct thing to use here.

(cherry picked from commit 1b5c8aac12)
This commit is contained in:
Sergei Zimmerman 2025-04-24 22:27:03 +00:00 committed by Mergify
parent 3019007eb5
commit b179259d6f

View file

@ -134,7 +134,7 @@ void parseTree(
RawMode rawMode = std::stoi(perms, 0, 8);
auto modeOpt = decodeMode(rawMode);
if (!modeOpt)
throw Error("Unknown Git permission: %o", perms);
throw Error("Unknown Git permission: %o", rawMode);
auto mode = std::move(*modeOpt);
std::string name = getStringUntil(source, '\0');