From f51fc643ce287f235f4a4f7d6f0d60f1132b8544 Mon Sep 17 00:00:00 2001 From: nasenatmer Date: Wed, 15 May 2013 03:15:03 +0100 Subject: [PATCH] Add check for unrar command to avoid error messages. --- modules/archive/functions/extract | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/archive/functions/extract b/modules/archive/functions/extract index 5f69516f..5b56b0d5 100644 --- a/modules/archive/functions/extract +++ b/modules/archive/functions/extract @@ -53,7 +53,8 @@ while (( $# > 0 )); do (*.lzma) unlzma "$1" ;; (*.Z) uncompress "$1" ;; (*.zip) unzip "$1" -d $extract_dir ;; - (*.rar) unrar e -ad "$1" || rar e -ad "$1" ;; + (*.rar) unrar &> /dev/null && unrar e -ad "$1" \ + || rar e -ad "$1" ;; (*.7z) 7za x "$1" ;; (*.deb) mkdir -p "$extract_dir/control"