Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
drmrbrewer opened this issue Dec 17, 2021 · 22 comments
Labels
bug Something isn't working

Comments

@drmrbrewer
Copy link

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).

@jsjoeio
Copy link
Contributor

jsjoeio commented Dec 17, 2021

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

@code-asher
Copy link
Member

code-asher commented Dec 20, 2021 via email

@code-asher code-asher added the bug Something isn't working label Dec 20, 2021
@drmrbrewer
Copy link
Author

drmrbrewer commented Dec 21, 2021

@code-asher the same thing happens when I try to download a file (in my example a log.html file) that is too big to open and show (completely) in the editor, i.e. downloading a file where the following message appears merely trying to open the file into the editor:

image

Downloading a smaller version of the same log.html file works just fine.

@code-asher
Copy link
Member

code-asher commented Dec 22, 2021 via email

@stale
Copy link

stale bot commented Jun 22, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale This issue has not had activity in a while and will be closed label Jun 22, 2022
@drmrbrewer
Copy link
Author

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!

@stale stale bot removed the stale This issue has not had activity in a while and will be closed label Jun 22, 2022
@jsjoeio jsjoeio added this to the On Deck - High Priority milestone Jun 22, 2022
@thomasapto
Copy link

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

@code-asher
Copy link
Member

code-asher commented Jul 18, 2022 via email

@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 20, 2022

Can't reproduce

I'm testing right now on my macOS + Brave + code-server 4.5.1.

I actually don't have the option to download folders 🤔

image

And come to think of it, I don't know if I have ever?

Same behavior in github.dev

I also don't see the Download option in github.dev...so I feel like this is a limitation upstream?

image

Open issues

It seems like this is a limitation of Code Web so I don't think we can't do anything about this.

microsoft/vscode#120908

@code-asher
Copy link
Member

code-asher commented Jul 21, 2022 via email

@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 21, 2022

Since this has been identified as an upstream limitation, I'm going to close this since I don't think we can work around this.

@jsjoeio jsjoeio closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2022
@drmrbrewer
Copy link
Author

@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.

@jsjoeio
Copy link
Contributor

jsjoeio commented Jul 21, 2022

Oh wow, that is an awesome workaround! Thanks for pointing that out!

@youthHan
Copy link

youthHan commented Sep 3, 2022

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.

@thomasapto
Copy link

  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.)

@1234567Yang
Copy link

just choose Picture floder:
This PC: Pictures

@filipjnc
Copy link

filipjnc commented May 3, 2023

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.

@DabenW
Copy link

DabenW commented Jun 20, 2023

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

@drmrbrewer
Copy link
Author

So it seems like there's no workaround, but @jsjoeio at the very least could code-server display a more informative message (e.g. telling the user what the issue is and how they can work around it), even if this is an upstream issue? Or is even the message an upstream issue?

@jsjoeio
Copy link
Contributor

jsjoeio commented Jun 20, 2023

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

@code-asher
Copy link
Member

code-asher commented Jun 20, 2023 via email

@suporte-avancado
Copy link

just choose Picture floder: This PC: Pictures

this works for mac

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

9 participants