| ... | @@ -1108,9 +1108,10 @@ Error os_update_file(Buf *src_path, Buf *dst_path) { | ... | @@ -1108,9 +1108,10 @@ Error os_update_file(Buf *src_path, Buf *dst_path) { |
| 1108 | return err; | 1108 | return err; |
| 1109 | } | 1109 | } |
| 1110 | | 1110 | |
| 1111 | if (src_attr.mtime.sec == dst_attr.mtime.sec && | 1111 | if (src_attr.size == dst_attr.size && |
| 1112 | src_attr.mtime.nsec == dst_attr.mtime.nsec && | 1112 | src_attr.mode == dst_attr.mode && |
| 1113 | src_attr.mode == dst_attr.mode) | 1113 | src_attr.mtime.sec == dst_attr.mtime.sec && |
| | 1114 | src_attr.mtime.nsec == dst_attr.mtime.nsec) |
| 1114 | { | 1115 | { |
| 1115 | os_file_close(&src_file); | 1116 | os_file_close(&src_file); |
| 1116 | os_file_close(&dst_file); | 1117 | os_file_close(&dst_file); |
| ... | @@ -1871,6 +1872,7 @@ Error os_file_open_rw(Buf *full_path, OsFile *out_file, OsFileAttr *attr, bool n | ... | @@ -1871,6 +1872,7 @@ Error os_file_open_rw(Buf *full_path, OsFile *out_file, OsFileAttr *attr, bool n |
| 1871 | windows_filetime_to_os_timestamp(&file_info.ftLastWriteTime, &attr->mtime); | 1872 | windows_filetime_to_os_timestamp(&file_info.ftLastWriteTime, &attr->mtime); |
| 1872 | attr->inode = (((uint64_t)file_info.nFileIndexHigh) << 32) | file_info.nFileIndexLow; | 1873 | attr->inode = (((uint64_t)file_info.nFileIndexHigh) << 32) | file_info.nFileIndexLow; |
| 1873 | attr->mode = 0; | 1874 | attr->mode = 0; |
| | 1875 | attr->size = (((uint64_t)file_info.nFileSizeHigh) << 32) | file_info.nFileSizeLow; |
| 1874 | } | 1876 | } |
| 1875 | | 1877 | |
| 1876 | return ErrorNone; | 1878 | return ErrorNone; |
| ... | @@ -1918,6 +1920,7 @@ Error os_file_open_rw(Buf *full_path, OsFile *out_file, OsFileAttr *attr, bool n | ... | @@ -1918,6 +1920,7 @@ Error os_file_open_rw(Buf *full_path, OsFile *out_file, OsFileAttr *attr, bool n |
| 1918 | attr->mtime.nsec = statbuf.st_mtim.tv_nsec; | 1920 | attr->mtime.nsec = statbuf.st_mtim.tv_nsec; |
| 1919 | #endif | 1921 | #endif |
| 1920 | attr->mode = statbuf.st_mode; | 1922 | attr->mode = statbuf.st_mode; |
| | 1923 | attr->size = statbuf.st_size; |
| 1921 | } | 1924 | } |
| 1922 | return ErrorNone; | 1925 | return ErrorNone; |
| 1923 | } | 1926 | } |