Dragging in folders with subdirectories does not work

I tried dragging in a directory with admittedly quite a few files but get the following error message toast in vscode:

cannot open glitchfs://mammoth-unicorn/ni-webvi-resource-v0/favicon.ico. Detail: Unable to read file (Error: document 6nJBxHDeQAL2Takv not found on the server)

And at that point the vscode editor and the web viewer are out of sync, the folder I dragged in looks empty in vscode while the files seem to have uploaded online (but I didn’t thoroughly check).

Clicking the refresh explorer button in vscode doesn’t seem to do anything (at least it doesn’t populate the folder that was dragged in).

Running the Glitch close project and open project commands does seem to actually refresh the view.

However another issue is that I have a folder in my folder that was dragged in named node_modules and it looks like that was ignored and did not get uploaded :frowning:

I created a zip archive of the folder structure I was trying to drag in to share with y’all.

I dragged the zip archive into the vscode editor and it looks like it uploaded. However the zip file does not show up in the online editor. If I use Glitch console and list directory contents I see the archive so I guess it did upload.

It’s in this glitch https://glitch.com/edit/#!/rough-tsunami-1?path=server.js:1:0

Noticed the download project feature in the linked rough-tsunami-1 glitch and downloaded the project to see if the zip I uploaded to it was present. The good news is that it is present. The strange news is that extracting the archive on windows using 7zip results in the error “Can not create symbolic link: a required privilege is not held by the client” and the path is to \app\.node-gyp.

Okay, seems like a couple of things might be going on here.

The extension has some trouble with non-text files. We’ve got that sorted out for the next release and it will likely solve some of the issues here (at least the uploaded files not displaying after seemingly having made it to the server).

As for node_modules and .zip, I’m not sure those are extension-specific issues and not the expected result of ignore rules. Are you able to accomplish the same thing successfully on the web?

1 Like

The .zip was intended to be a way to share the large folder structure that had problems being dragged in with y’all to help reproduce the issue by unzipping it and trying to drag in the same folder structure. I think it’s weird that zip files are hidden, but it’s not my biggest use case, so I’m not that concerned.

The web behaves weird here. I can add a file in a similar folder structure as my project:

And if I click view it works and prints to the console as expected. But if I refresh the page the file disappears in the web view but still seems to be available on disk and served by my server.

Hey @rajsite I think what you’re seeing with the file in the node-modules subfolder is expected behavior. The global gitignore file in the project container at /etc/gitignore-global explicitly ignores any directory named node_modules. Sorry for the bother!