From 4eee9f81879ad51df8177655f3f357630719c818 Mon Sep 17 00:00:00 2001 From: CanbiZ <47820557+MickLesk@users.noreply.github.com> Date: Thu, 3 Jul 2025 15:13:34 +0200 Subject: [PATCH] Update tools.func --- misc/tools.func | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/misc/tools.func b/misc/tools.func index f07a0433..1793ce45 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -917,13 +917,7 @@ function fetch_and_deploy_gh_release() { fi $STD unzip "$tmpdir/$filename" -d "$target" elif [[ "$filename" == *.tar.* ]]; then - tar -xf "$tmpdir/$filename" -C "$tmpdir" - local unpack_dir - unpack_dir=$(find "$tmpdir" -mindepth 1 -maxdepth 1 -type d | head -n1) - - shopt -s dotglob nullglob - cp -r "$unpack_dir"/* "$target/" - shopt -u dotglob nullglob + tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target" else msg_error "Unsupported archive format: $filename" rm -rf "$tmpdir"