diff options
author | Joseph Hunkeler <jhunkeler@users.noreply.github.com> | 2020-06-05 17:30:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-05 17:30:59 -0400 |
commit | 9be2ab9a7578eb9f4f0d784267504cde379282ee (patch) | |
tree | 37cfeb152fc4709fc4a56bc3f28a33fb6139049a /lib/archive.c | |
parent | f76fed00c9c9289b354e7f8dd6f14ea699ef16a2 (diff) | |
download | spmc-9be2ab9a7578eb9f4f0d784267504cde379282ee.tar.gz |
Use bsdtar instead of tar (#44)
Diffstat (limited to 'lib/archive.c')
-rw-r--r-- | lib/archive.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/archive.c b/lib/archive.c index d964469..18f0437 100644 --- a/lib/archive.c +++ b/lib/archive.c @@ -35,7 +35,7 @@ int tar_extract_file(const char *_archive, const char* _filename, const char *_d strchrdel(destination, SHELL_INVALID); strchrdel(filename, SHELL_INVALID); - sprintf(cmd, "tar xf \"%s\" -C \"%s\" \"%s\" 2>&1", archive, destination, filename); + sprintf(cmd, "bsdtar -x -f \"%s\" -C \"%s\" \"%s\" 2>&1", archive, destination, filename); if (exists(archive) != 0) { fprintf(stderr, "unable to find archive: %s\n", archive); fprintf(SYSERROR); @@ -92,7 +92,7 @@ int tar_extract_archive(const char *_archive, const char *_destination) { // sanitize destination strchrdel(destination, SHELL_INVALID); - sprintf(cmd, "tar xf %s -C %s 2>&1", archive, destination); + sprintf(cmd, "bsdtar -x -f %s -C %s 2>&1", archive, destination); shell(&proc, SHELL_OUTPUT, cmd); if (!proc) { fprintf(SYSERROR); |