Merge pull request #5043 from alyssais/vexing

libutil: use uniform initialization in _deletePath
This commit is contained in:
Eelco Dolstra
2021-07-27 09:54:24 +02:00
committed by GitHub
+1 -1
View File
@@ -435,7 +435,7 @@ static void _deletePath(const Path & path, uint64_t & bytesFreed)
if (dir == "")
dir = "/";
AutoCloseFD dirfd(open(dir.c_str(), O_RDONLY));
AutoCloseFD dirfd{open(dir.c_str(), O_RDONLY)};
if (!dirfd) {
if (errno == ENOENT) return;
throw SysError("opening directory '%1%'", path);