fix(metadata_v2): check for any files before building hardlink table

This commit is contained in:
Marcus Holland-Moritz 2024-11-16 17:41:32 +01:00
parent 3504ce97ef
commit 07f759a3f4

View File

@ -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_);