From f1315115c781e80639ff2fe805a32fc33f401cef Mon Sep 17 00:00:00 2001 From: Mikhail Tergoev Date: Fri, 4 Jul 2025 09:12:40 +0300 Subject: [PATCH] unpack: remove file if error --- winehelper | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/winehelper b/winehelper index 17d97c3..466f9a1 100755 --- a/winehelper +++ b/winehelper @@ -259,11 +259,13 @@ unpack () { esac create_new_dir "$2" if [[ $skip_xattr == "1" ]] \ - && $command "$1" ${outarg}"$2" 2>&1 | grep -v "xattr" + && $command "$1" ${outarg}"$2" 2>&1 | sed "/xattr/d" then print_ok "Файл $1 распакован." elif $command "$1" ${outarg}"$2" then print_ok "Файл $1 распакован." - else fatal "Распаковать файл $1 не удалось!" + else + try_remove_file "$1" + fatal "Распаковать файл $1 не удалось!" fi return 0 }