diff --git a/misc/tools.func b/misc/tools.func index 0e0a5ea0d..e59602162 100644 --- a/misc/tools.func +++ b/misc/tools.func @@ -957,7 +957,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"