about summary refs log tree commit diff
path: root/pkgs/build-support/build-sandbox/src/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/build-support/build-sandbox/src/setup.c')
-rw-r--r--pkgs/build-support/build-sandbox/src/setup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/build-support/build-sandbox/src/setup.c b/pkgs/build-support/build-sandbox/src/setup.c
index dfe550e0..a23983c8 100644
--- a/pkgs/build-support/build-sandbox/src/setup.c
+++ b/pkgs/build-support/build-sandbox/src/setup.c
@@ -95,6 +95,11 @@ static bool makedirs(const char *path, bool do_cache)
 {
     char *tmp, *segment;
 
+    if (*path != '/') {
+        fprintf(stderr, "fatal: Path '%s' is not absolute.\n", path);
+        return false;
+    }
+
     if ((tmp = strdup(path)) == NULL) {
         fprintf(stderr, "strdup of %s: %s\n", path, strerror(errno));
         return false;