diff options
author | Jeremy Allison <jra@samba.org> | 2005-03-07 23:54:24 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2005-03-07 23:54:24 +0000 |
commit | ad4c70e564a52c5508a91de3450051f1a977bbb6 (patch) | |
tree | 2a06680c9fae5f9a904122cb07b08cfca536361f /source/client | |
parent | b4235eebb8d3e0d764a067b95df2ce179a0ff6d2 (diff) | |
download | samba-ad4c70e564a52c5508a91de3450051f1a977bbb6.tar.gz samba-ad4c70e564a52c5508a91de3450051f1a977bbb6.tar.xz samba-ad4c70e564a52c5508a91de3450051f1a977bbb6.zip |
r5687: Fix for bug #2398 from Kevin Dalley <kevin@kelphead.org>.
smbtar shouldn't assume /dev/null means dryrun.
Jeremy.
Diffstat (limited to 'source/client')
-rw-r--r-- | source/client/clitar.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/source/client/clitar.c b/source/client/clitar.c index 14ebffb60ff..524feca1d2a 100644 --- a/source/client/clitar.c +++ b/source/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)) { |