Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10951/ntfsprogs
Modified Files:
ntfsmount.c
Log Message:
ntfsmount: fix nr_links for directories.
Index: ntfsmount.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsmount.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- ntfsmount.c 1 Aug 2005 13:40:51 -0000 1.17
+++ ntfsmount.c 1 Aug 2005 22:04:28 -0000 1.18
@@ -264,6 +264,7 @@ static int ntfs_fuse_getattr(const char
stbuf->st_size = 0;
stbuf->st_blocks = 0;
}
+ stbuf->st_nlink = 1; /* Needed for correct find work. */
} else {
stbuf->st_mode = S_IFREG | (0777 & ~ctx->fmask);
na = ntfs_attr_open(ni, AT_DATA, stream_name,
@@ -279,11 +280,11 @@ static int ntfs_fuse_getattr(const char
if (stream_name_len)
res = -ENOENT;
}
+ stbuf->st_nlink = le16_to_cpu(ni->mrec->link_count);
}
stbuf->st_uid = ctx->uid;
stbuf->st_gid = ctx->gid;
stbuf->st_ino = ni->mft_no;
- stbuf->st_nlink = le16_to_cpu(ni->mrec->link_count);
stbuf->st_atime = ni->atime;
stbuf->st_ctime = ni->ctime;
stbuf->st_mtime = ni->mtime;
|