[svn] dirmngr - r292 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Fri Feb 15 19:14:49 CET 2008
Author: marcus
Date: 2008-02-15 19:14:48 +0100 (Fri, 15 Feb 2008)
New Revision: 292
Modified:
trunk/src/ChangeLog
trunk/src/crlcache.c
Log:
2008-02-15 Marcus Brinkmann <marcus at g10code.de>
* crlcache.c (update_dir) [HAVE_W32_SYSTEM]: Remove destination
file before rename.
(crl_cache_insert) [HAVE_W32_SYSTEM]: Remove destination file
before rename.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-02-15 15:29:50 UTC (rev 291)
+++ trunk/src/ChangeLog 2008-02-15 18:14:48 UTC (rev 292)
@@ -1,3 +1,10 @@
+2008-02-15 Marcus Brinkmann <marcus at g10code.de>
+
+ * crlcache.c (update_dir) [HAVE_W32_SYSTEM]: Remove destination
+ file before rename.
+ (crl_cache_insert) [HAVE_W32_SYSTEM]: Remove destination file
+ before rename.
+
2008-02-14 Marcus Brinkmann <marcus at g10code.de>
* validate.c (check_cert_policy): Use ksba_free instead of xfree.
Modified: trunk/src/crlcache.c
===================================================================
--- trunk/src/crlcache.c 2008-02-15 15:29:50 UTC (rev 291)
+++ trunk/src/crlcache.c 2008-02-15 18:14:48 UTC (rev 292)
@@ -860,6 +860,10 @@
}
fpout = NULL;
+#ifdef HAVE_W32_SYSTEM
+ /* No atomic mv on W32 systems. */
+ unlink (fname);
+#endif
if (rename (tmpfname, fname))
{
err = gpg_error_from_errno (errno);
@@ -2032,8 +2036,11 @@
/* Rename the temporary DB to the real name. */
newfname = make_db_file_name (entry->issuer_hash);
if (opt.verbose)
- log_info (_("creating cache file `%s'\n"), newfname );
- if (rename (fname, newfname) )
+ log_info (_("creating cache file `%s'\n"), newfname);
+#ifdef HAVE_W32_SYSTEM
+ unlink (newfname);
+#endif
+ if (rename (fname, newfname))
{
err = gpg_error_from_errno (errno);
log_error (_("problem renaming `%s' to `%s': %s\n"),
More information about the Gnupg-commits
mailing list