fix filename hashing error

This commit is contained in:
Antonio SJ Musumeci 2020-03-07 11:22:33 -05:00
parent ada90eab57
commit 3a46ec9fab
5 changed files with 13 additions and 40 deletions

View file

@ -94,7 +94,6 @@ namespace l
{
int dirfd;
int64_t nread;
uint64_t namelen;
basepath = fs::path::make(&branches_[i].path,dirname_);
@ -114,12 +113,11 @@ namespace l
if(nread == 0)
break;
for(int64_t pos = 0; pos < nread;)
for(int64_t pos = 0; pos < nread; pos += d->d_reclen)
{
d = (struct linux_dirent64*)(buf + pos);
namelen = (d->d_reclen - offsetof(struct linux_dirent64,d_name));
rv = names.put(d->d_name,namelen);
rv = names.put(d->d_name);
if(rv == 0)
continue;
@ -128,8 +126,6 @@ namespace l
rv = fuse_dirents_add_linux(buf_,d);
if(rv)
return close_free_ret_enomem(dirfd,buf);
pos += d->d_reclen;
}
}