Author: pschweitzer
Date: Sun Oct 19 19:48:52 2014
New Revision: 64832
URL:
http://svn.reactos.org/svn/reactos?rev=64832&view=rev
Log:
[NTFS]
Bugfixing... Part 8/X:
- Actually, the files timestamp are already stored in the correct format on-disk... I
should have listened to Thomas...
This fixes incorrect dates display when enumerating a directory contents. My apologies
Thomas :-(.
Last to fix: the file size which is broken.
Modified:
trunk/reactos/drivers/filesystems/ntfs/dirctl.c
trunk/reactos/drivers/filesystems/ntfs/misc.c
trunk/reactos/drivers/filesystems/ntfs/ntfs.h
Modified: trunk/reactos/drivers/filesystems/ntfs/dirctl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/d…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/dirctl.c [iso-8859-1] Sun Oct 19 19:48:52 2014
@@ -175,11 +175,10 @@
ROUND_UP(sizeof(FILE_DIRECTORY_INFORMATION) + Length, sizeof(ULONG));
RtlCopyMemory(Info->FileName, FileName->Name, Length);
- /* Convert file times */
- NtfsDateTimeToFileTime(FileName->CreationTime, &Info->CreationTime);
- NtfsDateTimeToFileTime(FileName->LastAccessTime, &Info->LastAccessTime);
- NtfsDateTimeToFileTime(FileName->LastWriteTime, &Info->LastWriteTime);
- NtfsDateTimeToFileTime(FileName->ChangeTime, &Info->ChangeTime);
+ Info->CreationTime.QuadPart = FileName->CreationTime;
+ Info->LastAccessTime.QuadPart = FileName->LastAccessTime;
+ Info->LastWriteTime.QuadPart = FileName->LastWriteTime;
+ Info->ChangeTime.QuadPart = FileName->ChangeTime;
/* Convert file flags */
NtfsFileFlagsToAttributes(FileName->FileAttributes,
&Info->FileAttributes);
@@ -217,11 +216,10 @@
ROUND_UP(sizeof(FILE_FULL_DIRECTORY_INFORMATION) + Length, sizeof(ULONG));
RtlCopyMemory(Info->FileName, FileName->Name, Length);
- /* Convert file times */
- NtfsDateTimeToFileTime(FileName->CreationTime, &Info->CreationTime);
- NtfsDateTimeToFileTime(FileName->LastAccessTime, &Info->LastAccessTime);
- NtfsDateTimeToFileTime(FileName->LastWriteTime, &Info->LastWriteTime);
- NtfsDateTimeToFileTime(FileName->ChangeTime, &Info->ChangeTime);
+ Info->CreationTime.QuadPart = FileName->CreationTime;
+ Info->LastAccessTime.QuadPart = FileName->LastAccessTime;
+ Info->LastWriteTime.QuadPart = FileName->LastWriteTime;
+ Info->ChangeTime.QuadPart = FileName->ChangeTime;
/* Convert file flags */
NtfsFileFlagsToAttributes(FileName->FileAttributes,
&Info->FileAttributes);
@@ -260,11 +258,10 @@
ROUND_UP(sizeof(FILE_BOTH_DIR_INFORMATION) + Length, sizeof(ULONG));
RtlCopyMemory(Info->FileName, FileName->Name, Length);
- /* Convert file times */
- NtfsDateTimeToFileTime(FileName->CreationTime, &Info->CreationTime);
- NtfsDateTimeToFileTime(FileName->LastAccessTime, &Info->LastAccessTime);
- NtfsDateTimeToFileTime(FileName->LastWriteTime, &Info->LastWriteTime);
- NtfsDateTimeToFileTime(FileName->ChangeTime, &Info->ChangeTime);
+ Info->CreationTime.QuadPart = FileName->CreationTime;
+ Info->LastAccessTime.QuadPart = FileName->LastAccessTime;
+ Info->LastWriteTime.QuadPart = FileName->LastWriteTime;
+ Info->ChangeTime.QuadPart = FileName->ChangeTime;
/* Convert file flags */
NtfsFileFlagsToAttributes(FileName->FileAttributes,
&Info->FileAttributes);
Modified: trunk/reactos/drivers/filesystems/ntfs/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/m…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/misc.c [iso-8859-1] Sun Oct 19 19:48:52 2014
@@ -97,18 +97,6 @@
return IrpContext;
}
-/* See:
- ->
http://msdn.microsoft.com/en-us/library/ms724228
- ->
http://bos.asmhackers.net/docs/filesystems/ntfs/standard.html#layout
- */
-VOID
-NtfsDateTimeToFileTime(ULONGLONG NtfsTime,
- PLARGE_INTEGER SystemTime)
-{
-
- SystemTime->QuadPart = NtfsTime + 116444736000000000;
-}
-
VOID
NtfsFileFlagsToAttributes(ULONG NtfsAttributes,
PULONG FileAttributes)
Modified: trunk/reactos/drivers/filesystems/ntfs/ntfs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/ntfs/n…
==============================================================================
--- trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/ntfs/ntfs.h [iso-8859-1] Sun Oct 19 19:48:52 2014
@@ -693,10 +693,6 @@
#endif
VOID
-NtfsDateTimeToFileTime(ULONGLONG NtfsTime,
- PLARGE_INTEGER SystemTime);
-
-VOID
NtfsFileFlagsToAttributes(ULONG NtfsAttributes,
PULONG FileAttributes);