ntfsmount: Submit inode number during readdir

Some broken programs rely on that filesystem will submit inode number during
readdir() (what is optional). Make them happy since it is really not a problem.
(Ted Anderson, Szaka)
edge.strict_endians
Yura Pakhuchiy 2007-09-07 15:39:30 +03:00
parent ec2afb736c
commit b392bd17c8
1 changed files with 5 additions and 2 deletions

View File

@ -577,8 +577,11 @@ static int ntfs_fuse_filler(ntfs_fuse_fill_context_t *fill_ctx,
free(filename);
return 0;
}
if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user)
fill_ctx->filler(fill_ctx->buf, filename, NULL, 0);
if (MREF(mref) == FILE_root || MREF(mref) >= FILE_first_user) {
struct stat st = { .st_ino = MREF(mref) };
fill_ctx->filler(fill_ctx->buf, filename, &st, 0);
}
free(filename);
return 0;
}