aboutsummaryrefslogtreecommitdiffstats
path: root/g10/openfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/openfile.c')
-rw-r--r--g10/openfile.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/g10/openfile.c b/g10/openfile.c
index a00785e96..394bec32e 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -70,6 +70,11 @@ overwrite_filep( const char *fname )
if( access( fname, F_OK ) )
return 1; /* does not exist */
+#ifndef HAVE_DOSISH_SYSTEM
+ if ( !strcmp ( fname, "/dev/null" ) )
+ return 1; /* does not do any harm */
+#endif
+
/* fixme: add some backup stuff in case of overwrite */
if( opt.answer_yes )
return 1;
@@ -105,6 +110,11 @@ make_outfile_name( const char *iname )
buf[n-4] = 0;
return buf;
}
+ else if( n > 5 && !CMP_FILENAME(iname+n-5,".sign") ) {
+ char *buf = m_strdup( iname );
+ buf[n-5] = 0;
+ return buf;
+ }
log_info(_("%s: unknown suffix\n"), iname );
return NULL;
@@ -241,7 +251,8 @@ open_sigfile( const char *iname )
if( iname && !(*iname == '-' && !iname[1]) ) {
len = strlen(iname);
if( len > 4 && ( !strcmp(iname + len - 4, ".sig")
- || !strcmp(iname + len - 4, ".asc")) ) {
+ || ( len > 5 && !strcmp(iname + len - 5, ".sign") )
+ || !strcmp(iname + len - 4, ".asc")) ) {
char *buf;
buf = m_strdup(iname);
buf[len-4] = 0 ;
@@ -321,3 +332,6 @@ try_make_homedir( const char *fname )
}
}
+
+
+