Changeset 38193 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- Jul 27, 2011 9:34:56 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 73157
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/SharedFolders/redirector/sys/fileinfo.c
r33994 r38193 1589 1589 { 1590 1590 PFILE_ALLOCATION_INFORMATION pAllocInfo = (PFILE_ALLOCATION_INFORMATION)pBuffer; 1591 1592 Log(("VBOXSF: VBoxMRxSetFileInformation: FileAllocationInformation: AllocSize = %RX64\n", pAllocInfo->AllocationSize.QuadPart)); 1593 1594 /* Pretend success */ 1595 Status = STATUS_SUCCESS; 1591 LARGE_INTEGER NewAllocationSize; 1592 1593 Log(("VBOXSF: VBoxMRxSetFileInformation: FileAllocationInformation: new AllocSize = %RX64, FileSize = %RX64\n", 1594 pAllocInfo->AllocationSize.QuadPart, capFcb->Header.FileSize.QuadPart)); 1595 1596 /* Check if the new allocation size changes the file size. */ 1597 if (pAllocInfo->AllocationSize.QuadPart > capFcb->Header.FileSize.QuadPart) 1598 { 1599 /* Ignore this request and return success. Shared folders do not distinguish between 1600 * AllocationSize and FileSize. 1601 */ 1602 Status = STATUS_SUCCESS; 1603 } 1604 else 1605 { 1606 /* Treat the request as a EndOfFile update. */ 1607 Status = VBoxMRxSetEndOfFile(RxContext, &pAllocInfo->AllocationSize, &NewAllocationSize); 1608 } 1609 1596 1610 break; 1597 1611 } … … 1602 1616 LARGE_INTEGER NewAllocationSize; 1603 1617 1604 Log(("VBOXSF: VBoxMRxSetFileInformation: FileEndOfFileInformation: FileSize = %RX64\n", capFcb->Header.AllocationSize.QuadPart)); 1605 if (pEndOfFileInfo->EndOfFile.QuadPart > capFcb->Header.AllocationSize.QuadPart) 1618 Log(("VBOXSF: VBoxMRxSetFileInformation: FileEndOfFileInformation: new EndOfFile %RX64, FileSize = %RX64\n", 1619 pEndOfFileInfo->EndOfFile.QuadPart, capFcb->Header.FileSize.QuadPart)); 1620 if (pEndOfFileInfo->EndOfFile.QuadPart > capFcb->Header.FileSize.QuadPart) 1606 1621 { 1607 1622 Status = VBoxMRxExtendFile(RxContext, &pEndOfFileInfo->EndOfFile, &NewAllocationSize);
Note:
See TracChangeset
for help on using the changeset viewer.