diff options
Diffstat (limited to 'source/fud_directory.cpp')
-rw-r--r-- | source/fud_directory.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/fud_directory.cpp b/source/fud_directory.cpp index 99f3600..6df5bcc 100644 --- a/source/fud_directory.cpp +++ b/source/fud_directory.cpp @@ -29,7 +29,10 @@ struct Stat : public CStat {}; Result<DirectoryEntry, FudStatus> DirectoryEntry::fromStat(const String& name, const Stat& statBuffer) { using RetType = Result<DirectoryEntry, FudStatus>; - static_assert(std::is_same_v<decltype(statBuffer.st_size), long>); + static_assert(std::is_same_v<decltype(statBuffer.st_ino), unsigned long>); + static_assert(sizeof(decltype(statBuffer.st_ino)) <= sizeof(size_t)); + + static_assert(std::is_same_v<decltype(statBuffer.st_size), signed long>); static_assert(sizeof(decltype(statBuffer.st_size)) <= sizeof(size_t)); static_assert(std::is_same_v<decltype(statBuffer.st_nlink), unsigned long>); @@ -71,7 +74,7 @@ Result<DirectoryEntry, FudStatus> DirectoryEntry::fromStat(const String& name, c } return RetType::okay( - DirectoryEntry{name, size, static_cast<size_t>(statBuffer.st_nlink), statBuffer.st_mtime, entryType}); + DirectoryEntry{name, statBuffer.st_ino, size, static_cast<size_t>(statBuffer.st_nlink), statBuffer.st_mtime, entryType}); } Directory::Directory(String name) : m_name{name} |