diff --git a/AUTHORS b/AUTHORS index 38a9ae4d..28ce05fa 100644 --- a/AUTHORS +++ b/AUTHORS @@ -90,4 +90,5 @@ reporting bugs, providing fixes, suggesting useful features or other: Mads Freek Petersen Stefan Richter Mattias Åsander + adg-mh diff --git a/ChangeLog b/ChangeLog index 59b0d745..2c460025 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +01/17/2024 +- use `apr_file_rename` in file backend to fix issue with renaming files on windows + 01/09/2024 - release 2.4.15 diff --git a/src/cache/file.c b/src/cache/file.c index 60096df5..1ace87a1 100644 --- a/src/cache/file.c +++ b/src/cache/file.c @@ -408,7 +408,7 @@ static apr_byte_t oidc_cache_file_set(request_rec *r, const char *section, const apr_file_unlock(fd); apr_file_close(fd); - if (rename(path, target) != 0) { + if ((rc = apr_file_rename(path, target, r->pool)) != APR_SUCCESS) { oidc_error(r, "cache file: %s could not be renamed to: %s", path, target); return FALSE; }