mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-12-17 21:08:25 +08:00
fix: Fix the decompression issue of TGZ files (#10338)
This commit is contained in:
parent
986bffaf2b
commit
f5fcbcd87a
3 changed files with 6 additions and 2 deletions
|
|
@ -588,7 +588,7 @@ func getFormat(cType CompressType) archiver.CompressedArchive {
|
|||
switch cType {
|
||||
case Tar:
|
||||
format.Archival = archiver.Tar{}
|
||||
case TarGz, Gz:
|
||||
case TarGz, Gz, Tgz:
|
||||
format.Compression = archiver.Gz{}
|
||||
format.Archival = archiver.Tar{}
|
||||
case SdkTarGz:
|
||||
|
|
|
|||
|
|
@ -463,6 +463,7 @@ const (
|
|||
TarBz2 CompressType = "tar.bz2"
|
||||
Tar CompressType = "tar"
|
||||
TarGz CompressType = "tar.gz"
|
||||
Tgz CompressType = "tgz"
|
||||
Xz CompressType = "xz"
|
||||
TarXz CompressType = "tar.xz"
|
||||
SdkZip CompressType = "sdkZip"
|
||||
|
|
|
|||
|
|
@ -688,7 +688,7 @@ import VscodeOpenDialog from '@/components/vscode-open/index.vue';
|
|||
import { debounce } from 'lodash-es';
|
||||
import TerminalDialog from './terminal/index.vue';
|
||||
import { Dashboard } from '@/api/interface/dashboard';
|
||||
import { CompressExtension } from '@/enums/files';
|
||||
import { CompressExtension, CompressType } from '@/enums/files';
|
||||
import type { TabPaneName } from 'element-plus';
|
||||
|
||||
const globalStore = GlobalStore();
|
||||
|
|
@ -1190,6 +1190,9 @@ const openDeCompress = (item: File.File) => {
|
|||
if (CompressExtension[Mimetypes.get(item.mimeType)] != item.extension) {
|
||||
fileDeCompress.type = getEnumKeyByValue(item.extension);
|
||||
}
|
||||
if (item.name.endsWith('.tar.gz') || item.name.endsWith('.tgz')) {
|
||||
fileDeCompress.type = CompressType.TarGz;
|
||||
}
|
||||
|
||||
fileDeCompress.name = item.name;
|
||||
fileDeCompress.path = item.path;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue