- size_1 = ((u64)file_info_1.nFileSizeHigh << 32) |
- file_info_1.nFileSizeLow;
- size_2 = ((u64)file_info_2.nFileSizeHigh << 32) |
- file_info_2.nFileSizeLow;
- if (size_1 != size_2) {
- error(L"Size for %ls (%"PRIu64") differs from size for %ls (%"PRIu64")",
- path_1, size_1, path_2, size_2);
+ attribs = file_info_1.dwFileAttributes;
+
+ if (!(attribs & FILE_ATTRIBUTE_DIRECTORY)) {
+ size_1 = ((u64)file_info_1.nFileSizeHigh << 32) |
+ file_info_1.nFileSizeLow;
+ size_2 = ((u64)file_info_2.nFileSizeHigh << 32) |
+ file_info_2.nFileSizeLow;
+ if (size_1 != size_2) {
+ error(L"Size for %ls (%"PRIu64") differs from size for %ls (%"PRIu64")",
+ path_1, size_1, path_2, size_2);
+ }