mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-26 15:56:18 +02:00
readProcLink: Replace unnecessary value judgement by actual info
This commit is contained in:
parent
12c91a823e
commit
9fa133dde5
1 changed files with 1 additions and 1 deletions
|
@ -339,7 +339,7 @@ static void readProcLink(const std::string & file, UncheckedRoots & roots)
|
||||||
throw SysError("reading symlink");
|
throw SysError("reading symlink");
|
||||||
}
|
}
|
||||||
if (res == bufsiz) {
|
if (res == bufsiz) {
|
||||||
throw Error("stupidly long symlink");
|
throw Error("overly long symlink starting with '%1%'", std::string_view(buf, bufsiz));
|
||||||
}
|
}
|
||||||
if (res > 0 && buf[0] == '/')
|
if (res > 0 && buf[0] == '/')
|
||||||
roots[std::string(static_cast<char *>(buf), res)]
|
roots[std::string(static_cast<char *>(buf), res)]
|
||||||
|
|
Loading…
Reference in a new issue