From 96f4a39aaf270c53fe64d3335e5087448f19add2 Mon Sep 17 00:00:00 2001 From: cha0smaster Date: Sun, 3 Jul 2005 01:49:17 +0000 Subject: [PATCH] ntfsmount: it's not a error when file didn't contain unnamed data attribute. E.g. $Secure. --- ntfsprogs/ntfsmount.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsmount.c b/ntfsprogs/ntfsmount.c index 3b8de24c..86ae6aed 100644 --- a/ntfsprogs/ntfsmount.c +++ b/ntfsprogs/ntfsmount.c @@ -211,6 +211,9 @@ static int ntfs_fuse_getattr(const char *path, struct stat *stbuf) stbuf->st_blocks = na->allocated_size >> vol->sector_size_bits; ntfs_attr_close(na); + } else { + stbuf->st_size = 0; + stbuf->st_blocks = 0; } } else { stbuf->st_mode = S_IFREG | (0777 & ~ctx->fmask); @@ -220,8 +223,10 @@ static int ntfs_fuse_getattr(const char *path, struct stat *stbuf) stbuf->st_blocks = na->allocated_size >> vol->sector_size_bits; ntfs_attr_close(na); - } else - res = -errno; + } else { + stbuf->st_size = 0; + stbuf->st_blocks = 0; + } } stbuf->st_uid = ctx->uid; stbuf->st_gid = ctx->gid;