diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-17 00:13:30 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-17 00:13:30 -0500 |
commit | 1c2cdc4d8e28ce1b4c0d1ba75686f05fd5dd772d (patch) | |
tree | 32257d5a12cc0dc06c62e4212806573477065080 /src/archive.c | |
parent | b5dc6f2c428b4555d3e56e628605f54e4a63b16e (diff) | |
download | spmc-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.c | 12 |
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); |