Juan Lang : cryptnet: Delete existing cache entries when out of date.

Alexandre Julliard julliard at winehq.org
Wed Feb 23 13:01:52 CST 2011


Module: wine
Branch: master
Commit: 2a53eb708796bdf07792c8c34ccb643c11fbfb86
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2a53eb708796bdf07792c8c34ccb643c11fbfb86

Author: Juan Lang <juan.lang at gmail.com>
Date:   Tue Feb 22 18:43:40 2011 -0800

cryptnet: Delete existing cache entries when out of date.

---

 dlls/cryptnet/cryptnet_main.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c
index e8e7adf..26e8fe7 100644
--- a/dlls/cryptnet/cryptnet_main.c
+++ b/dlls/cryptnet/cryptnet_main.c
@@ -740,11 +740,16 @@ static void CRYPT_CacheURL(LPCWSTR pszURL, const CRYPT_BLOB_ARRAY *pObject,
             if (ret)
                 lstrcpyW(cacheFileName, info->lpszLocalFileName);
             /* Check if the existing cache entry is up to date.  If it isn't,
-             * overwite it with the new value.
+             * remove the existing cache entry, and create a new one with the
+             * new value.
              */
             GetSystemTimeAsFileTime(&ft);
             if (CompareFileTime(&info->ExpireTime, &ft) < 0)
+            {
                 create = TRUE;
+                DeleteUrlCacheEntryW(pszURL);
+                DeleteFileW(cacheFileName);
+            }
             CryptMemFree(info);
         }
         else




More information about the wine-cvs mailing list