[UDFS]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 4 Jun 2017 19:17:10 +0000 (19:17 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 4 Jun 2017 19:17:10 +0000 (19:17 +0000)
Complete the implementation of UDFGetNetworkInformation() so that it sets all the fields.
This fixes displaying file size in explorer.

CORE-4375
CORE-13366

svn path=/trunk/; revision=74919

reactos/drivers/filesystems/udfs/fileinfo.cpp

index fa6b3e1..bb611e5 100644 (file)
@@ -697,6 +697,7 @@ UDFGetNetworkInformation(
         PtrBuffer->CreationTime = Fcb->NTRequiredFCB->CreationTime;
         PtrBuffer->LastAccessTime = Fcb->NTRequiredFCB->LastAccessTime;
         PtrBuffer->LastWriteTime = Fcb->NTRequiredFCB->LastWriteTime;
+        PtrBuffer->ChangeTime = Fcb->NTRequiredFCB->ChangeTime;
 
         FileInfo = Fcb->FileInfo;
 
@@ -711,6 +712,13 @@ UDFGetNetworkInformation(
 #ifdef UDF_DBG
             if(!FileInfo->Dloc->DirIndex) AdPrint(("*****!!!!! Directory has no DirIndex !!!!!*****\n"));
 #endif
+        } else {
+            if(Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize.LowPart == 0xffffffff) {
+                Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize.QuadPart =
+                    UDFSysGetAllocSize(Fcb->Vcb, UDFGetFileSize(FileInfo));
+            }
+            PtrBuffer->AllocationSize = Fcb->NTRequiredFCB->CommonFCBHeader.AllocationSize;
+            PtrBuffer->EndOfFile = Fcb->NTRequiredFCB->CommonFCBHeader.FileSize;
         }
         // Similarly, fill in attributes indicating a hidden file, system
         // file, compressed file, temporary file, etc. if the FSD supports