From 85aa8a5ac03d8f94128b910e4af5b27d2dd3fd5e Mon Sep 17 00:00:00 2001 From: Connor <18592150+hpf3@users.noreply.github.com> Date: Mon, 1 Jul 2024 03:49:22 +0000 Subject: [PATCH] add check for absolute directories to world copy script --- scripts/start-setupWorld | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/start-setupWorld b/scripts/start-setupWorld index 200d7ab2f0a..57e26a07baa 100755 --- a/scripts/start-setupWorld +++ b/scripts/start-setupWorld @@ -5,10 +5,15 @@ set -e isDebugging && set -x -if [ "$TYPE" = "CURSEFORGE" ]; then - worldDest=$FTB_DIR/${LEVEL:-world} +# support absolute directories +if [[ "${LEVEL:-world}" =~ ^\/.*$ ]]; then + worldDest=${LEVEL} else - worldDest=/data/${LEVEL:-world} + if [ "$TYPE" = "CURSEFORGE" ]; then + worldDest=$FTB_DIR/${LEVEL:-world} + else + worldDest=/data/${LEVEL:-world} + fi fi if [[ "$WORLD" ]] && ( isTrue "${FORCE_WORLD_COPY}" || [ ! -d "$worldDest" ] ); then