diff options
Diffstat (limited to 'src/copy.c')
-rw-r--r-- | src/copy.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -4,11 +4,14 @@ #include <fcntl.h> #include <filehandler.h> #include <ftw.h> +#include <main.h> #include <string.h> #include <sys/sendfile.h> #include <sys/stat.h> #include <unistd.h> +extern msg_t *msg; + int copy_recursively(const char *fpath, const struct stat *sb, @@ -18,7 +21,7 @@ copy_recursively(const char *fpath, (void) sb; (void) ftwbuf; - const char *path = fpath + strlen(DIRECTORY) + 1; + const char *path = fpath + strlen(msg->base_directory) + 1; char *output_path = NULL; asprintf(&output_path, "%s/%s", OUTPUT, path); |