aboutsummaryrefslogtreecommitdiff
path: root/src/archive.c
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2020-02-17 00:13:30 -0500
committerJoseph Hunkeler <jhunkeler@gmail.com>2020-02-17 00:13:30 -0500
commit1c2cdc4d8e28ce1b4c0d1ba75686f05fd5dd772d (patch)
tree32257d5a12cc0dc06c62e4212806573477065080 /src/archive.c
parentb5dc6f2c428b4555d3e56e628605f54e4a63b16e (diff)
downloadspmc-1c2cdc4d8e28ce1b4c0d1ba75686f05fd5dd772d.tar.gz
Refactor continues:
* Implement multiple manifests * Random bug fixes * More bugs added * Start removing references to SPM_GLOBAL.package_dir * Start using manifests for everything * Simplify mkmanifest_interface
Diffstat (limited to 'src/archive.c')
-rw-r--r--src/archive.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/archive.c b/src/archive.c
index ef89c3a..e12acf0 100644
--- a/src/archive.c
+++ b/src/archive.c
@@ -31,9 +31,9 @@ int tar_extract_file(const char *_archive, const char* _filename, const char *_d
return -1;
}
- strchrdel(archive, "&;|");
- strchrdel(destination, "&;|");
- strchrdel(filename, "&;|");
+ strchrdel(archive, SHELL_INVALID);
+ strchrdel(destination, SHELL_INVALID);
+ strchrdel(filename, SHELL_INVALID);
sprintf(cmd, "tar xf \"%s\" -C \"%s\" \"%s\" 2>&1", archive, destination, filename);
if (exists(archive) != 0) {
@@ -69,7 +69,7 @@ int tar_extract_archive(const char *_archive, const char *_destination) {
char cmd[PATH_MAX];
if (exists(_archive) != 0) {
- fprintf(SYSERROR);
+ //fprintf(SYSERROR);
return -1;
}
@@ -85,9 +85,9 @@ int tar_extract_archive(const char *_archive, const char *_destination) {
}
// sanitize archive
- strchrdel(archive, "&;|");
+ strchrdel(archive, SHELL_INVALID);
// sanitize destination
- strchrdel(destination, "&;|");
+ strchrdel(destination, SHELL_INVALID);
sprintf(cmd, "tar xf %s -C %s 2>&1", archive, destination);
shell(&proc, SHELL_OUTPUT, cmd);