diff --git a/bot/helper/ext_utils/fs_utils.py b/bot/helper/ext_utils/fs_utils.py index 8044c76..cbf50b2 100644 --- a/bot/helper/ext_utils/fs_utils.py +++ b/bot/helper/ext_utils/fs_utils.py @@ -74,6 +74,8 @@ def get_base_name(orig_path: str): return orig_path.replace(".tgz", "") elif orig_path.endswith(".zip"): return orig_path.replace(".zip", "") + elif orig_path.endswith(".7z"): + return orig_path.replace(".7z", "") elif orig_path.endswith(".Z"): return orig_path.replace(".Z", "") elif orig_path.endswith(".rar"): diff --git a/extract b/extract index 0d17ae0..da9847b 100755 --- a/extract +++ b/extract @@ -42,6 +42,11 @@ extract() { 7z x "$arg" -o"$a_dir" local code=$? ;; + *.7z) + a_dir=$(expr "$arg" : '\(.*\).7z') + 7z x "$arg" -o"$a_dir" + local code=$? + ;; *.Z) uncompress "$arg" local code=$?