aboutsummaryrefslogtreecommitdiffstats
path: root/g10/openfile.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/openfile.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/g10/openfile.c b/g10/openfile.c
index 7ccd43a45..34be71d62 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -1,5 +1,5 @@
/* openfile.c
- * Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ * Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -286,7 +286,6 @@ open_sigfile( const char *iname )
return a;
}
-
/****************
* Copy the option file skeleton to the given directory.
*/
@@ -299,6 +298,8 @@ copy_options_file( const char *destdir )
int linefeeds=0;
int c;
mode_t oldmask;
+ int esc = 0;
+ int any_option = 0;
if( opt.dry_run )
return;
@@ -327,12 +328,27 @@ copy_options_file( const char *destdir )
if( c == '\n' )
linefeeds++;
}
- else
+ else {
putc( c, dst );
+ if (c== '\n')
+ esc = 1;
+ else if (esc == 1) {
+ if (c == ' ' || c == '\t')
+ ;
+ else if (c == '#')
+ esc = 2;
+ else
+ any_option = 1;
+ }
+ }
}
fclose( dst );
fclose( src );
log_info(_("new configuration file `%s' created\n"), fname );
+ if (any_option)
+ log_info (_("WARNING: options in `%s'"
+ " are not yet active during this run\n"),
+ fname);
m_free(fname);
}