diff options
Diffstat (limited to 'src/Format/Tcformat.c')
-rw-r--r-- | src/Format/Tcformat.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c index dba64c20..013e27ca 100644 --- a/src/Format/Tcformat.c +++ b/src/Format/Tcformat.c @@ -3313,6 +3313,12 @@ BOOL IsSparseFile (HWND hwndDlg) if (bPreserveTimestamp) { + FILETIME ftLastAccessTime; + ftLastAccessTime.dwHighDateTime = 0xFFFFFFFF; + ftLastAccessTime.dwLowDateTime = 0xFFFFFFFF; + + SetFileTime (hFile, NULL, &ftLastAccessTime, NULL); + if (GetFileTime (hFile, NULL, &ftLastAccessTime, NULL) == 0) bTimeStampValid = FALSE; else @@ -3352,6 +3358,12 @@ BOOL GetFileVolSize (HWND hwndDlg, unsigned __int64 *size) if (bPreserveTimestamp) { + FILETIME ftLastAccessTime; + ftLastAccessTime.dwHighDateTime = 0xFFFFFFFF; + ftLastAccessTime.dwLowDateTime = 0xFFFFFFFF; + + SetFileTime (hFile, NULL, &ftLastAccessTime, NULL); + if (GetFileTime (hFile, NULL, &ftLastAccessTime, NULL) == 0) bTimeStampValid = FALSE; else |