diff --git a/misc/tools.func b/misc/tools.func index 99db6d99..a69c95b1 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -931,7 +931,11 @@ function fetch_and_deploy_gh_release() { fi $STD unzip "$tmpdir/$filename" -d "$target" elif [[ "$filename" == *.tar.* ]]; then - tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target" + if tar -tf "$tmpdir/$filename" | grep -qE '^([^/]+/){2}'; then + tar --strip-components=1 -xf "$tmpdir/$filename" -C "$target" + else + tar -xf "$tmpdir/$filename" -C "$target" + fi else msg_error "Unsupported archive format: $filename" rm -rf "$tmpdir"