Fill in st_blocks so that du works
authorSteve McIntyre <steve@einval.com>
Wed, 29 Jun 2011 23:59:54 +0000 (00:59 +0100)
committerSteve McIntyre <steve@einval.com>
Wed, 29 Jun 2011 23:59:54 +0000 (00:59 +0100)
C/fuse-music.c

index 88f6208..1d10f32 100644 (file)
@@ -772,7 +772,7 @@ static int fm_getattr(const char *path, struct stat *stbuf)
         stbuf->st_mode = S_IFREG | 0444;
         stbuf->st_nlink = 1;
         stbuf->st_size = size;
-        stbuf->st_blocks = 0;
+        stbuf->st_blocks = (size+511)/512;
     }
     
     free(flac_path);