From 00340b20f956a1b6a55654bba1e1c396b9db479a Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 7 Mar 2005 23:54:24 +0000 Subject: r5687: Fix for bug #2398 from Kevin Dalley . smbtar shouldn't assume /dev/null means dryrun. Jeremy. (This used to be commit 84e7b7db8992db7812b8e09b8633c257657fb91c) --- source3/client/clitar.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source3/client/clitar.c') diff --git a/source3/client/clitar.c b/source3/client/clitar.c index 14ebffb60f..524feca1d2 100644 --- a/source3/client/clitar.c +++ b/source3/client/clitar.c @@ -1761,11 +1761,7 @@ int tar_parseargs(int argc, char *argv[], const char *Optarg, int Optind) } } else { - if (tar_type=='c' && (dry_run || strcmp(argv[Optind], "/dev/null")==0)) { - if (!dry_run) { - DEBUG(0,("Output is /dev/null, assuming dry_run\n")); - dry_run = True; - } + if (tar_type=='c' && dry_run) { tarhandle=-1; } else if ((tar_type=='x' && (tarhandle = sys_open(argv[Optind], O_RDONLY, 0)) == -1) || (tar_type=='c' && (tarhandle=sys_creat(argv[Optind], 0644)) < 0)) { -- cgit