2004-05-21 Marcus Brinkmann <marcus@g10code.de>
authorMarcus Brinkmann <mb@g10code.com>
Fri, 21 May 2004 13:46:13 +0000 (13:46 +0000)
committerMarcus Brinkmann <mb@g10code.com>
Fri, 21 May 2004 13:46:13 +0000 (13:46 +0000)
* gpgconf-comp.c (gc_component_change_options): Move the
per-process backup file into a standard location.

tools/ChangeLog
tools/gpgconf-comp.c

index fa41aff..61fc7e6 100644 (file)
@@ -1,3 +1,8 @@
+2004-05-21  Marcus Brinkmann  <marcus@g10code.de>
+
+       * gpgconf-comp.c (gc_component_change_options): Move the
+       per-process backup file into a standard location.
+
 2004-05-03  Werner Koch  <wk@gnupg.org>
 
        * gpgconf-comp.c: Add --allow-mark-trusted for the gpg-agent.
index 735e87c..c7bfb0d 100644 (file)
@@ -2431,6 +2431,18 @@ gc_component_change_options (int component, FILE *in)
          (*gc_backend[backend].runtime_change) ();
       }
 
+  /* Move the per-process backup file into its place.  */
+  for (backend = 0; backend < GC_BACKEND_NR; backend++)  
+    if (orig_pathname[backend])
+      {
+       char *backup_pathname;
+
+       assert (dest_pathname[backend]);
+
+       backup_pathname = xasprintf ("%s.gpgconf.bak", dest_pathname[backend]);
+       rename (orig_pathname[backend], backup_pathname);
+      }
+
   if (line)
     free (line);
 }