Add FIXME

This commit is contained in:
Eelco Dolstra 2021-01-05 14:54:28 +01:00
parent 259100332f
commit b7bfc7ee52
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -61,6 +61,8 @@ std::optional<LinesOfCode> getCodeLines(const ErrPos & errPos)
if (errPos.origin == foFile) {
LinesOfCode loc;
try {
// FIXME: when running as the daemon, make sure we don't
// open a file to which the client doesn't have access.
AutoCloseFD fd = open(errPos.file.c_str(), O_RDONLY | O_CLOEXEC);
if (!fd) return {};