diff options
author | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-01-16 11:45:34 +0100 |
---|---|---|
committer | Carlos Martín Nieto <carlos@cmartin.tk> | 2012-01-16 11:46:49 +0100 |
commit | d9e5430e5a7bd5d2de7c4fee2f1afbd52ec5aa2f (patch) | |
tree | bd0392ca8b61bf79f6cced7f560fb5643fd900ba | |
parent | 1af56d7d7eae77525b84815858cc2de9c0aa60d8 (diff) | |
download | libgit2-d9e5430e5a7bd5d2de7c4fee2f1afbd52ec5aa2f.tar.gz |
Windows: store all 64 bits of the size in the stat structure
We force stat to be a stat64 structure, so we can and should put all
64 bits of the size in st_size.
-rw-r--r-- | src/win32/posix_w32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/win32/posix_w32.c b/src/win32/posix_w32.c index 00016542d..f68742fc0 100644 --- a/src/win32/posix_w32.c +++ b/src/win32/posix_w32.c @@ -80,7 +80,7 @@ static int do_lstat(const char *file_name, struct stat *buf) buf->st_uid = 0; buf->st_nlink = 1; buf->st_mode = (mode_t)fMode; - buf->st_size = fdata.nFileSizeLow; /* Can't use nFileSizeHigh, since it's not a stat64 */ + buf->st_size = (fdata.nFileSizeHigh << 32) + fdata.nFileSizeLow; buf->st_dev = buf->st_rdev = (_getdrive() - 1); buf->st_atime = filetime_to_time_t(&(fdata.ftLastAccessTime)); buf->st_mtime = filetime_to_time_t(&(fdata.ftLastWriteTime)); |