瀏覽代碼

Strip components flag on the gzip extractions. Required for the way MTA compresses it's archives.

Chaos 9 年之前
父節點
當前提交
5ed99c9943
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lgsm/functions/core_dl.sh

+ 1 - 1
lgsm/functions/core_dl.sh

@@ -58,7 +58,7 @@ fn_dl_extract(){
 	mime=$(file -b --mime-type "${filedir}/${filename}")
 
 	if [ "${mime}" == "application/gzip" ]||[ "${mime}" == "application/x-gzip" ]; then
-		tarcmd=$(tar -zxf "${filedir}/${filename}" -C "${extractdir}")
+		tarcmd=$(tar -zxf "${filedir}/${filename}" -C "${extractdir}" --strip-components=1)
 	elif [ "${mime}" == "application/x-bzip2" ]; then
 		tarcmd=$(tar -jxf "${filedir}/${filename}" -C "${extractdir}")
 	elif [ "${mime}" == "application/zip" ]; then