From 704ff97426ec7df9bada095969e8fd6121610cc9 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Thu, 10 Feb 2022 16:02:45 +0100 Subject: [PATCH] bin/ex: fix unpacking for zstd containers --- .local/bin/scripts/ex | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.local/bin/scripts/ex b/.local/bin/scripts/ex index fd8cbf2..2c17d6e 100755 --- a/.local/bin/scripts/ex +++ b/.local/bin/scripts/ex @@ -34,7 +34,8 @@ for arg do esac test "$(basename "$PWD")" = "$namepart" && if test $# -lt 2 -a "$(ls -U | wc -l)" -lt 3 - then mv * .. && cd .. && rm -d "$namepart" + then test "$(ls)" && mv * .. + cd .. && rm -d "$namepart" else cd .. && mv "$namepart" "$name" fi )