Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

fogcreek shellext: consistently manipulate date/time values as unsigned numbers

Changeset 969f02582917

Parent a3b01d1f74eb

by David Golub

Changes to one file · Browse files at 969f02582917 Showing diff from parent a3b01d1f74eb Diff from another changeset...

 
20
21
22
23
24
25
 
 
 
26
27
28
 
32
33
34
35
 
36
37
38
39
40
41
42
 
43
44
45
 
20
21
22
 
 
 
23
24
25
26
27
28
 
32
33
34
 
35
36
37
38
39
40
41
 
42
43
44
45
@@ -20,9 +20,9 @@
   int CWinstat::lstat(LPCTSTR lpszFile, bool bTime64)  { - const LONGLONG llDaysBetweenEpochs = 134774L; /* days between 1.1.1601 and 1.1.1970 */ - const LONGLONG llSecsBetweenEpochs = llDaysBetweenEpochs * 86400L; - const LONGLONG llDivisor = 10000000L; + const ULONGLONG llDaysBetweenEpochs = 134774L; /* days between 1.1.1601 and 1.1.1970 */ + const ULONGLONG llSecsBetweenEpochs = llDaysBetweenEpochs * 86400L; + const ULONGLONG llDivisor = 10000000L;     WIN32_FIND_DATA data;   HANDLE hFind; @@ -32,14 +32,14 @@
  return -1;   ::FindClose(hFind);   - ullMTime = (((LONGLONG)data.ftLastWriteTime.dwHighDateTime << 32) + + ullMTime = (((ULONGLONG)data.ftLastWriteTime.dwHighDateTime << 32) +   data.ftLastWriteTime.dwLowDateTime);   if (!bTime64)   {   ullMTime /= llDivisor;   ullMTime -= llSecsBetweenEpochs;   } - ullSize = ((LONGLONG)data.nFileSizeHigh << 32) + data.nFileSizeLow; + ullSize = ((ULONGLONG)data.nFileSizeHigh << 32) + data.nFileSizeLow;   bIsDir = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;     return 0;