From 1c2cdc4d8e28ce1b4c0d1ba75686f05fd5dd772d Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 17 Feb 2020 00:13:30 -0500 Subject: 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 --- src/fs.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'src/fs.c') diff --git a/src/fs.c b/src/fs.c index 1572bee..f8a276c 100644 --- a/src/fs.c +++ b/src/fs.c @@ -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); -- cgit