summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-03-07 23:54:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:55:54 -0500
commit00340b20f956a1b6a55654bba1e1c396b9db479a (patch)
tree0a0e9a9153d14a8e0f7ad66b781b353bed1728e2
parenta26386ec92a44ba1f28427abbd1bb6c534dc0232 (diff)
downloadsamba-00340b20f956a1b6a55654bba1e1c396b9db479a.tar.gz
samba-00340b20f956a1b6a55654bba1e1c396b9db479a.tar.bz2
samba-00340b20f956a1b6a55654bba1e1c396b9db479a.zip
r5687: Fix for bug #2398 from Kevin Dalley <kevin@kelphead.org>.
smbtar shouldn't assume /dev/null means dryrun. Jeremy. (This used to be commit 84e7b7db8992db7812b8e09b8633c257657fb91c)
-rw-r--r--source3/client/clitar.c6
1 files changed, 1 insertions, 5 deletions
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)) {