aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Kortstiege <mkortstiege@kodi.tv>2015-03-09 16:41:23 +0100
committerMatthias Kortstiege <mkortstiege@kodi.tv>2015-03-09 16:41:23 +0100
commit514d76a0847f7609d82d3f4f4c6aa880a81b2333 (patch)
treef4889c45a43ee1d9f5d44b4dcf9e02e875e56acb
parent6251aa417b243c03c7d8ef482ea2657b4cbb0b18 (diff)
[win32file] use LastWriteTime instead of ChangeTime (fixes #15590)
-rw-r--r--xbmc/filesystem/win32/Win32File.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/xbmc/filesystem/win32/Win32File.cpp b/xbmc/filesystem/win32/Win32File.cpp
index 0c8b661bc8..c2f8a385ca 100644
--- a/xbmc/filesystem/win32/Win32File.cpp
+++ b/xbmc/filesystem/win32/Win32File.cpp
@@ -533,9 +533,7 @@ int CWin32File::Stat(const CURL& url, struct __stat64* statData)
FILE_BASIC_INFO basicInfo;
if (GetFileInformationByHandleEx(hFile, FileBasicInfo, &basicInfo, sizeof(basicInfo)) != 0)
{
- statData->st_mtime = CWIN32Util::fileTimeToTimeT(basicInfo.ChangeTime); // most accurate value
- if (statData->st_mtime == 0)
- statData->st_mtime = CWIN32Util::fileTimeToTimeT(basicInfo.LastWriteTime); // less accurate value
+ statData->st_mtime = CWIN32Util::fileTimeToTimeT(basicInfo.LastWriteTime);
statData->st_atime = CWIN32Util::fileTimeToTimeT(basicInfo.LastAccessTime);
statData->st_ctime = CWIN32Util::fileTimeToTimeT(basicInfo.CreationTime);
}
@@ -638,9 +636,7 @@ int CWin32File::Stat(struct __stat64* statData)
if (GetFileInformationByHandleEx(m_hFile, FileBasicInfo, &basicInfo, sizeof(basicInfo)) == 0)
return -1; // can't get basic file information
- statData->st_mtime = CWIN32Util::fileTimeToTimeT(basicInfo.ChangeTime); // most accurate value
- if (statData->st_mtime == 0)
- statData->st_mtime = CWIN32Util::fileTimeToTimeT(basicInfo.LastWriteTime); // less accurate value
+ statData->st_mtime = CWIN32Util::fileTimeToTimeT(basicInfo.LastWriteTime);
statData->st_atime = CWIN32Util::fileTimeToTimeT(basicInfo.LastAccessTime);
if (statData->st_atime == 0)