This commit is contained in:
Eelco Dolstra 2017-11-20 17:32:58 +01:00
parent 7a2b64e55c
commit d0b88db441
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -221,9 +221,9 @@ Path readLink(const Path & path)
ssize_t rlSize = readlink(path.c_str(), buf, bufSize);
if (rlSize == -1)
if (errno == EINVAL)
throw Error(format("'%1%' is not a symlink") % path);
throw Error("'%1%' is not a symlink", path);
else
throw SysError(format("reading symbolic link '%1%'") % path);
throw SysError("reading symbolic link '%1%'", path);
else if (rlSize < bufSize)
return string(buf, rlSize);
}