Ver código fonte

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

Chaos 9 anos atrás
pai
commit
5ed99c9943
1 arquivos alterados com 1 adições e 1 exclusões
  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