diff options
author | Walter Lozano <walter.lozano@collabora.com> | 2021-12-17 22:44:09 -0300 |
---|---|---|
committer | Walter Lozano <walter.lozano@collabora.com> | 2021-12-21 13:27:45 -0300 |
commit | d39fb70401cbb05b407a32fc7eec8542056b0ce5 (patch) | |
tree | 75fdf0652df03827e55d3595a3820c762e94b251 /tar/bsdtar.c | |
parent | 411284e3f5819a5726622f3f129ebf2859f2d46b (diff) | |
download | libarchive-d39fb70401cbb05b407a32fc7eec8542056b0ce5.tar.gz |
Fix check for tape device
In b6b423f0 a fallback in tar to stdio was implemented. However, the check
for the tape device didn't interpret the correct value returned from
access(). Fix the check to implement the fallback to stdio properly.
Signed-off-by: Walter Lozano <walter.lozano@collabora.com>
Diffstat (limited to 'tar/bsdtar.c')
-rw-r--r-- | tar/bsdtar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tar/bsdtar.c b/tar/bsdtar.c index b55b4c6c..75249d10 100644 --- a/tar/bsdtar.c +++ b/tar/bsdtar.c @@ -216,9 +216,9 @@ main(int argc, char **argv) #if defined(_PATH_DEFTAPE) if (bsdtar->filename == NULL) { #if defined(_WIN32) && !defined(__CYGWIN__) - int tapeExists = _access(_PATH_DEFTAPE, 0); + int tapeExists = !_access(_PATH_DEFTAPE, 0); #else - int tapeExists = access(_PATH_DEFTAPE, F_OK); + int tapeExists = !access(_PATH_DEFTAPE, F_OK); #endif if (tapeExists) { bsdtar->filename = _PATH_DEFTAPE; |