mergerfs/libfuse/include/fs_dirent64.hpp
Antonio SJ Musumeci 4fe0e90bc3 Fix dirent64::namelen calculation
Worked fine on my machine where padding seemed to be all zeroed out
but that doesn't appear to be the case elsewhere.

Could try
https://codeberg.org/jbruchon/libjodycode/src/branch/master/dir.c#L92-L110
but needs to be tested.
2025-09-30 11:01:31 -05:00

25 lines
306 B
C++

#pragma once
#include <cstddef>
#include <cstdint>
#include <cstring>
namespace fs
{
struct dirent64
{
public:
uint64_t ino;
int64_t off;
uint16_t reclen;
uint8_t type;
char name[];
public:
size_t
namelen() const
{
return ::strlen(name);
}
};
}