aboutsummaryrefslogtreecommitdiffstats
path: root/g10/openfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/openfile.c')
-rw-r--r--g10/openfile.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/g10/openfile.c b/g10/openfile.c
index a6383a44a..d142f6712 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -76,6 +76,10 @@ overwrite_filep( const char *fname )
if ( !strcmp ( fname, "/dev/null" ) )
return 1; /* does not do any harm */
#endif
+#ifdef HAVE_W32_SYSTEM
+ if ( !strcmp ( fname, "nul" ) )
+ return 1;
+#endif
/* fixme: add some backup stuff in case of overwrite */
if( opt.answer_yes )
@@ -193,8 +197,14 @@ open_outfile( const char *iname, int mode, IOBUF *a )
char *buf = NULL;
const char *name;
- if( opt.dry_run )
- name = "/dev/null";
+ if ( opt.dry_run )
+ {
+#ifdef HAVE_W32_SYSTEM
+ name = "nul";
+#else
+ name = "/dev/null";
+#endif
+ }
else if( opt.outfile )
name = opt.outfile;
else {