AdamRaichu / vscode-zip-viewer

An extension which allows for the manipulation of zip files in VS Code.
https://marketplace.visualstudio.com/items?itemName=AdamRaichu.zip-viewer
MIT License
13 stars 1 forks source link

bug: creating zip of workspace root tries to save outside of workspace #43

Open AdamRaichu opened 1 year ago

AdamRaichu commented 1 year ago

Describe the bug Creating a zip of the workspace root (either through right-clicking the area of the explorer view that does not contain any files, or through the command interface) causes the extension to attempt to save to a location that is outside the current workspace.

To Reproduce Steps to reproduce the behavior:

  1. Open a repo in vscode.dev.
  2. Right click the explorer view within the area shown (see screenshot).
  3. Select Zip Tools: Create a zip file from folder.
  4. Extension status bars hangs at Saving... and loads indefinitely. Console shows error (below).

Expected behavior The extension should not try to write outside of the workspace but should instead show an error. Perhaps it could also ask if the user would like to save it to the workspace root instead.

Screenshots If applicable, add screenshots to help explain your problem.

image

Environment What type of VS Code were you using when you encountered the problem?

vscode.dev

Additional context Add any other context about the problem here.

[Extension Host] Error (FileSystemError): Unable to write file 'vscode-vfs://github/AdamRaichu/vscode-extensions.zip' (AdamRaichu/undefined: Request failed due to following response errors:
 - Could not resolve to a Repository with the name 'AdamRaichu/undefined'.)
    at Function.c (../../../vs/workbench/api/worker/extensionHostWorker.js:82:27160)
    at Object.writeFile (../../../vs/workbench/api/worker/extensionHostWorker.js:82:25814)