Skip to content

Commit

Permalink
fix(metadata_v2): check for any files before building hardlink table
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Nov 16, 2024
1 parent 39e8f57 commit 9a72900
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/reader/internal/metadata_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -878,7 +878,7 @@ class metadata_ final : public metadata_v2::impl {
build_nlinks(metadata_options const& options) const {
packed_int_vector<uint32_t> packed_nlinks;

if (options.enable_nlink) {
if (options.enable_nlink && dev_inode_offset_ > file_inode_offset_) {
auto td = LOG_TIMED_DEBUG;

std::vector<uint32_t> nlinks(dev_inode_offset_ - file_inode_offset_);
Expand Down

0 comments on commit 9a72900

Please sign in to comment.