Fix logic bug; we want to do_chdir if arg doesn't start with / _and_ it
doesn't start with @/ either. This unbreaks "tar -c -C /no/such/directory @/path/to/archive". MFC after: 3 days
This commit is contained in:
parent
f2d18f3112
commit
486641fcc5
@ -450,7 +450,7 @@ write_archive(struct archive *a, struct bsdtar *bsdtar)
|
||||
}
|
||||
set_chdir(bsdtar, arg);
|
||||
} else {
|
||||
if (*arg != '/' || (arg[0] == '@' && arg[1] != '/'))
|
||||
if (*arg != '/' && (arg[0] != '@' || arg[1] != '/'))
|
||||
do_chdir(bsdtar); /* Handle a deferred -C */
|
||||
if (*arg == '@') {
|
||||
if (append_archive(bsdtar, a, arg + 1) != 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user