GithubHelp home page GithubHelp logo

tjx666 / vscode-archive Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 3.0 13.46 MB

compress/decompress for .zip, .vsix, .crx(v3), .asar, .tgz, .gzip, .br, .tar

Home Page: https://marketplace.visualstudio.com/items?itemName=YuTengjing.vscode-archive

License: MIT License

TypeScript 100.00%
archive asar brotli compress crx crx3 decompress gzip tar tgz vscode-extension vsix zip

vscode-archive's Introduction

YuTengjing's github stats Top Langs

vscode-archive's People

Contributors

tjx666 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

vscode-archive's Issues

Treat .gz extensions as gzip

Issue Description

Gzip archives are supported but Gzip archive files with the .gz extension can't be decompressed.

Fix

Treat files with a .gz extensions the same as gzip:

case 'gzip':
await compressing.gzip.decompress(archivePath, dest);

to

case 'gzip':
case 'gz':
    await compressing.gzip.decompress(archivePath, dest);

"when": "!explorerResourceIsFolder && resourceFilename =~ /.+\\.(zip|vsix|crx|asar|tgz|gzip|tar|br)$/i",

to

"when": "!explorerResourceIsFolder && resourceFilename =~ /.+\\.(zip|vsix|crx|asar|tgz|gzip|gz|tar|br)$/i",

Compression not working in remote sessions

I logged in remotely via ssh with vscode and tried to compress some folder with zip or tar. Nothing happened. Both zip, unzip and tar utilities were installed in the host (Ubuntu 22.04). Decompression works ok. I was able to decompress a tar archive in the same remote session.
Tried the same on my local machine (also Ubuntu 22.04) and compression worked.

Feature Request - Extract Files to Current Directory 提取文件到当前目录功能请求

Issue Description/问题描述:

I have encountered a scenario where the file structure within some compressed files includes an additional folder. As a result, when I extract such files, a folder with the same name as the compressed file is created, and it contains the original folder structure from the compressed file.

如果压缩文件中的文件结构的根目录 是一个与压缩文件同名的文件夹。当我解压这样的文件时,会创建一个与压缩文件同名的文件夹,它包含了来自压缩文件的原始文件夹结构。

The results are as below:

结果如下:

.
├── file
│   └── file
│       └── TextFile.txt
└── file.zip

Feature Request/功能请求:

I would like to propose an enhancement to the plugin's file extraction behavior. Specifically, I suggest implementing a check to determine whether the file structure within the compressed file consists of a single file at the root level, sharing the same name as the compressed file. If such a scenario is detected, the plugin should extract the file directly to the current directory instead of creating an additional folder. On the other hand, if the file structure includes multiple files or folders, the plugin should continue creating a new folder and extracting the contents accordingly.

我建议对插件的文件解压行为进行增强。具体而言,我建议在解压缩过程中检查压缩文件内的文件结构是否只包含一个与压缩文件同名的文件位于根目录。如果检测到这种情况,插件应该直接将文件解压缩到当前目录,而不是创建额外的文件夹。另一方面,如果文件结构包含多个文件或文件夹,插件应该继续创建新的文件夹并相应地进行提取。

Or maybe adding a feature that allows extracting the files directly to the current directory instead of creating a new folder.
或者可以增加一个功能,允许直接将文件提取到当前目录,而不创建新的文件夹。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.