From ffe59fc3712a0f5528d2151ec69db2273ced1909 Mon Sep 17 00:00:00 2001 From: ttionya Date: Mon, 12 May 2025 15:24:23 +0800 Subject: [PATCH] fix: fix directory not found error (fixed #199) --- scripts/includes.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/includes.sh b/scripts/includes.sh index f4926a1..7d0c5ea 100644 --- a/scripts/includes.sh +++ b/scripts/includes.sh @@ -46,9 +46,14 @@ function check_rclone_connection() { do rclone ${RCLONE_GLOBAL_FLAG} lsd "${RCLONE_REMOTE_X}" > /dev/null if [[ $? != 0 ]]; then - color red "storage system connection failure $(color yellow "[${RCLONE_REMOTE_X}]")" + color red "storage system connection may not be initialized, try initializing $(color yellow "[${RCLONE_REMOTE_X}]")" - ((ERROR_COUNT++)) + rclone ${RCLONE_GLOBAL_FLAG} mkdir "${RCLONE_REMOTE_X}" + if [[ $? != 0 ]]; then + color red "storage system connection failure $(color yellow "[${RCLONE_REMOTE_X}]")" + + ((ERROR_COUNT++)) + fi fi done