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/fs.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/fs.c')
| -rw-r--r-- | src/fs.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -13,7 +13,14 @@ FSTree *fstree(const char *_path, char **filter_by, unsigned int filter_mode) { FTSENT *node = NULL; FSTree *fsdata = NULL; int no_filter = 0; - char *path = realpath(_path, NULL); + char *path = NULL; + + if (filter_mode & SPM_FSTREE_FLT_RELATIVE) { + path = strdup(_path); + } else { + path = realpath(_path, NULL); + } + if (path == NULL) { perror(_path); fprintf(SYSERROR); @@ -326,9 +333,9 @@ int rsync(const char *_args, const char *_source, const char *_destination) { strcat(args_combined, _args); } - strchrdel(args_combined, "&;|"); - strchrdel(source, "&;|"); - strchrdel(destination, "&;|"); + strchrdel(args_combined, SHELL_INVALID); + strchrdel(source, SHELL_INVALID); + strchrdel(destination, SHELL_INVALID); snprintf(cmd, PATH_MAX, "rsync %s \"%s\" \"%s\" 2>&1", args_combined, source, destination); shell(&proc, SHELL_OUTPUT, cmd); |
