aboutsummaryrefslogtreecommitdiff
path: root/src/copy.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/copy.c')
-rw-r--r--src/copy.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/copy.c b/src/copy.c
index ddada6a..9fd812f 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -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);