mirror of
https://github.com/NixOS/nix
synced 2025-06-27 00:11:17 +02:00
Eliminate redundant copy
This commit is contained in:
parent
e0d7d0e45c
commit
eea0401d7a
2 changed files with 3 additions and 1 deletions
|
@ -216,7 +216,7 @@ DirEntries readDirectory(const Path & path)
|
|||
checkInterrupt();
|
||||
string name = dirent->d_name;
|
||||
if (name == "." || name == "..") continue;
|
||||
entries.emplace_back(DirEntry({ name, dirent->d_ino, dirent->d_type }));
|
||||
entries.emplace_back(name, dirent->d_ino, dirent->d_type);
|
||||
}
|
||||
if (errno) throw SysError(format("reading directory `%1%'") % path);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue