1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-26 20:01:15 +02:00

LocalStoreAccessor: Reuse PosixSourceAccessor

This commit is contained in:
Eelco Dolstra 2023-11-01 17:22:25 +01:00
parent 1a902f5fa7
commit 2f5c1a27dc
2 changed files with 15 additions and 36 deletions

View file

@ -58,7 +58,8 @@ std::optional<SourceAccessor::Stat> PosixSourceAccessor::maybeLstat(const CanonP
S_ISDIR(st.st_mode) ? tDirectory :
S_ISLNK(st.st_mode) ? tSymlink :
tMisc,
.isExecutable = S_ISREG(st.st_mode) && st.st_mode & S_IXUSR
.fileSize = S_ISREG(st.st_mode) ? std::optional<uint64_t>(st.st_size) : std::nullopt,
.isExecutable = S_ISREG(st.st_mode) && st.st_mode & S_IXUSR,
};
}