Author: pschweitzer
Date: Sun Oct 19 20:12:14 2014
New Revision: 64833

URL: http://svn.reactos.org/svn/reactos?rev=64833&view=rev
Log:
[NTFS]
Bugfixing... Part 9/X:
- Return the appropriate size for file size.
- Round the allocation to cluster size (as requested by the API).

This fixes metadata display when enumerating a directory in CMD.
What you get now: 
http://www.heisspiter.net/~Pierre/rostests/NTFS_listing_fixed.png

Time to fix all the rest!
D'oh!

Modified:
    trunk/reactos/drivers/filesystems/ntfs/dirctl.c

Modified: trunk/reactos/drivers/filesystems/ntfs/dirctl.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/dirctl.c?rev=64833&r1=64832&r2=64833&view=diff
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/dirctl.c     [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/dirctl.c     [iso-8859-1] Sun Oct 19 
20:12:14 2014
@@ -183,8 +183,8 @@
     /* Convert file flags */
     NtfsFileFlagsToAttributes(FileName->FileAttributes, &Info->FileAttributes);
 
-    Info->EndOfFile.QuadPart = FileName->DataSize;
-    Info->AllocationSize.QuadPart = FileName->AllocatedSize;
+    Info->EndOfFile.QuadPart = FileName->AllocatedSize;
+    Info->AllocationSize.QuadPart = ROUND_UP(FileName->AllocatedSize, 
DeviceExt->NtfsInfo.BytesPerCluster);
 
 //  Info->FileIndex=;
 
@@ -224,8 +224,8 @@
     /* Convert file flags */
     NtfsFileFlagsToAttributes(FileName->FileAttributes, &Info->FileAttributes);
 
-    Info->EndOfFile.QuadPart = FileName->DataSize;
-    Info->AllocationSize.QuadPart = FileName->AllocatedSize;
+    Info->EndOfFile.QuadPart = FileName->AllocatedSize;
+    Info->AllocationSize.QuadPart = ROUND_UP(FileName->AllocatedSize, 
DeviceExt->NtfsInfo.BytesPerCluster);
 
 //  Info->FileIndex=;
     Info->EaSize = 0;
@@ -266,8 +266,8 @@
     /* Convert file flags */
     NtfsFileFlagsToAttributes(FileName->FileAttributes, &Info->FileAttributes);
 
-    Info->EndOfFile.QuadPart = FileName->DataSize;
-    Info->AllocationSize.QuadPart = FileName->AllocatedSize;
+    Info->EndOfFile.QuadPart = FileName->AllocatedSize;
+    Info->AllocationSize.QuadPart = ROUND_UP(FileName->AllocatedSize, 
DeviceExt->NtfsInfo.BytesPerCluster);
 
 //  Info->FileIndex=;
     Info->EaSize = 0;


Reply via email to