Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

shellext: fix calculations in Winstat

The calculation for size was incorrect (wrong amount shifted).
Made time calculations more portable.

Changeset 8f44afedd689

Parent a49a4a647ec3

by Adrian Buehlmann

Changes to one file · Browse files at 8f44afedd689 Showing diff from parent a49a4a647ec3 Diff from another changeset...

 
33
34
35
36
37
 
 
 
38
39
40
 
33
34
35
 
 
36
37
38
39
40
41
@@ -33,8 +33,9 @@
  return -1;   FindClose(hfind);   - this->mtime = *(__int64*)&data.ftLastWriteTime / divisor - secs_between_epochs; - this->size = (data.nFileSizeHigh << sizeof(data.nFileSizeHigh)) | data.nFileSizeLow; + this->mtime = (((__int64)data.ftLastWriteTime.dwHighDateTime << 32) + + data.ftLastWriteTime.dwLowDateTime) / divisor - secs_between_epochs; + this->size = ((__int64)data.nFileSizeHigh << 32) + data.nFileSizeLow;   this->isdir = (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) != 0;     return 0;