You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by iv...@apache.org on 2022/06/18 13:36:43 UTC
svn commit: r1902044 - in /apr/apr/branches/1.8.x: ./ CHANGES file_io/win32/filestat.c
Author: ivan
Date: Sat Jun 18 13:36:42 2022
New Revision: 1902044
URL: http://svn.apache.org/viewvc?rev=1902044&view=rev
Log:
On 1.8.x branch: Merge r1896623 from trunk:
Optimize apr_file_mtime_set() on Windows.
Modified:
apr/apr/branches/1.8.x/ (props changed)
apr/apr/branches/1.8.x/CHANGES
apr/apr/branches/1.8.x/file_io/win32/filestat.c
Propchange: apr/apr/branches/1.8.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r1896623
Modified: apr/apr/branches/1.8.x/CHANGES
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.8.x/CHANGES?rev=1902044&r1=1902043&r2=1902044&view=diff
==============================================================================
--- apr/apr/branches/1.8.x/CHANGES [utf-8] (original)
+++ apr/apr/branches/1.8.x/CHANGES [utf-8] Sat Jun 18 13:36:42 2022
@@ -74,6 +74,8 @@ Changes for APR 1.7.1
*) Fixed: apr_get_oslevel() was returning APR_WIN_XP on Windows 10
+ *) apr_file_mtime_set(): Minor optimization on Windows. [Ivan Zhakov]
+
Changes for APR 1.7.0 and later:
*) http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/CHANGES?view=markup
Modified: apr/apr/branches/1.8.x/file_io/win32/filestat.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.8.x/file_io/win32/filestat.c?rev=1902044&r1=1902043&r2=1902044&view=diff
==============================================================================
--- apr/apr/branches/1.8.x/file_io/win32/filestat.c (original)
+++ apr/apr/branches/1.8.x/file_io/win32/filestat.c Sat Jun 18 13:36:42 2022
@@ -877,20 +877,11 @@ APR_DECLARE(apr_status_t) apr_file_mtime
APR_OS_DEFAULT, pool);
if (!rv)
{
- FILETIME file_ctime;
- FILETIME file_atime;
FILETIME file_mtime;
- if (!GetFileTime(thefile->filehand,
- &file_ctime, &file_atime, &file_mtime))
+ AprTimeToFileTime(&file_mtime, mtime);
+ if (!SetFileTime(thefile->filehand, NULL, NULL, &file_mtime))
rv = apr_get_os_error();
- else
- {
- AprTimeToFileTime(&file_mtime, mtime);
- if (!SetFileTime(thefile->filehand,
- &file_ctime, &file_atime, &file_mtime))
- rv = apr_get_os_error();
- }
apr_file_close(thefile);
}