code-server: Trying to download a complete folder from the Explorer: "can't open this folder because it contains system files [Choose a different folder]"

This relates to code-server 3.12.0.

When I want to download a file to my local filesystem I right-click on the file in the Explorer and choose “Download…” – works fine… downloads right away to the Downloads folder on my local drive (without any prompt for where to save… which is fine).

But when I right-click on a folder to download the entire folder, I get the following message:

image

… where the redacted part is just the domain on which code-server instance is hosted e.g. codeserver.mydomain.com.

And no, the folder does not contain system files… not sure whether it’s referring to the remote folder or local folder, but either way there are no system files.

I’m not even sure it’s possible to download an entire folder in code-server / VSCode? I sure hope it is possible, and it feels like it’s trying to do the download (not just saying it’s not possible to download folders). Certainly on Cloud9 it is/was possible to download either a file or folder in this way, direct from the Explorer… for a folder it is just zipped and downloaded the folder as a zip (or maybe gz… either way is fine).

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 22 (10 by maintainers)

Most upvoted comments

just choose Picture floder: This PC: Pictures

I’m seeing the same problem. Following the instructions at here, on a Mac (Monterey 12.4). Tried various likely places to download to, starting with ~/Downloads, the default ~/Documents, and ~/Desktop. (BTW, Downloads permission should be in place: it is in system prefs > Security & Privacy > Files and Folders, as Google Chrome.app (checkmark) Downloads Folder. I’m loathe to give Chrome “Full Disk Access” which is unchecked.)

UPDATE: what finally worked was choosing /tmp (which is actually /private/tmp), with a couple of warnings along the lines of “github.dev will be able to read files until it’s restarted”.

(At this point, my question is, what is this github.dev thing? Maybe that’s what I need to be giving permissions to? It’s not a real application though…)

Thanks

Screen shot below: I right-clicked on pyqldbsamples > Download…

Screen Shot 2022-07-14 at 10 27 46 AM

I’m still seeing this (and being slightly frustrated by this) several times a day, so it would be great it this issue wasn’t marked as stale!

Ooo that is very interesting.

I have not seen it before. The last time I tried it was not even possible to download a folder so maybe it is new functionality that does not quite work yet. We will need to poke into the error.

A notification would require a patch to VS Code so it would be preferable to change it upstream if they are receptive to such a change, which I think they would be considering it probably affects their own Codespaces.

I don’t work on the project anymore but maybe @code-asher can chime in

As mentioned in this issue : see here. “It’s one of the stupid restrictions of File System Access API”. Just create a subdirectory in entire home directory, entire desktop or entire documents folder, and you can download your file or folder in there. image

just choose Picture floder: This PC: Pictures

Can confirm the Pictures folder works also on my Windows 11 work laptop. Simply choosing Downloads, Documents does not work.

  1. (I asked) “What is this github.dev thing”? It’s the web version of VSCode. You get to it from a github.com repo by typing . (a dot – aka hitting the period key). “Explorer” is the file tree view of a repo.
  2. @jsjoeio “I actually don’t have the option to download folders 🤔” It appears you are looking at a repo on your local machine? (URL says localhost:8080) Maybe the thing is saying, hey, this is already on your computer, why would you want to re-download it?
  3. @youthHan “I cannot find the tmp folder on the popout window on a MAC🤷‍♂️” The secret shortcut is Cmd-Shift-G and it lets you choose any folder; you can just type in the path. Such as, in this case, /tmp. (Note that the download dialog operates similarly to Finder, and this is a Finder shortcut too.)
  4. I found another workaround (besides using /tmp): It’s just Downloads per se that it doesn’t like, so, make a subdirectory to ~/Downloads and it will accept that. For example: Back at the original site I was trying to do this on, https://github.dev/aws-samples/amazon-qldb-dmv-sample-python, right click on pyqldbsamples and choose Download. In the popup window (the download dialog), navigate to the ~/Downloads folder (shortcut: Cmd-Opt-L) and click New Folder and type foo as the new folder name; it will create the folder and put you there; and then click Select to choose that location. It will ask for permission and warn you that the website will continue to have that permission until you leave it, and then proceed to download the files to there.

(It is acting like the JavaScript program that is github.dev gets read/write permissions to whatever folder you select. Maybe one can start a new project in a local directory and do development there using the online VSCode as an IDE, so, this makes some kind of sense. Chrome and MacOS must have provisions for doing so and have security around it, which is why they don’t want you to use Downloads, as this is a “special” folder – too dangerous if some website could drop malicious files there.)

I encountered the same problem. My workaround is to make a new folder and grant its writing permission to all users, as I cannot find the tmp folder on the popout window on a MAC🤷‍♂️. This workaround allows you to change the place where you want to download them and protect your other personal files. Hope it helps.

@jsjoeio shame. But thanks to @thomasapto (see here) I can now download folders from my code-server IDE, by choosing e.g. folder C:\Users\Joe\Temp\ to download into, rather than into Downloads.

Hmm…this is very strange 🤔 @code-asher have you seen this before?