mirror of
https://github.com/NixOS/nix
synced 2025-06-29 19:03:16 +02:00
Fix fd check
This commit is contained in:
parent
1efccf34b1
commit
d9730fc93b
1 changed files with 1 additions and 1 deletions
|
@ -296,7 +296,7 @@ Logger * makeJSONLogger(const std::filesystem::path & path, bool includeNixPrefi
|
|||
{ }
|
||||
};
|
||||
|
||||
auto fd{toDescriptor(open(path.c_str(), O_CREAT | O_APPEND | O_WRONLY, 0644))};
|
||||
AutoCloseFD fd{toDescriptor(open(path.c_str(), O_CREAT | O_APPEND | O_WRONLY, 0644))};
|
||||
if (!fd)
|
||||
throw SysError("opening log file '%1%'", path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue