From fb84c86f64019279800e6d92fe85d74b1fd4cf37 Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Fri, 21 May 2004 13:46:13 +0000 Subject: [PATCH] 2004-05-21 Marcus Brinkmann * gpgconf-comp.c (gc_component_change_options): Move the per-process backup file into a standard location. --- tools/ChangeLog | 5 +++++ tools/gpgconf-comp.c | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/tools/ChangeLog b/tools/ChangeLog index fa41aff0a..61fc7e625 100644 --- a/tools/ChangeLog +++ b/tools/ChangeLog @@ -1,3 +1,8 @@ +2004-05-21 Marcus Brinkmann + + * gpgconf-comp.c (gc_component_change_options): Move the + per-process backup file into a standard location. + 2004-05-03 Werner Koch * gpgconf-comp.c: Add --allow-mark-trusted for the gpg-agent. diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c index 735e87c86..c7bfb0d53 100644 --- a/tools/gpgconf-comp.c +++ b/tools/gpgconf-comp.c @@ -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); }