Closed muyulong closed 2 weeks ago
It looks like this might have been fixed since 4.22.1. I tested with 4.90.1, and in my case it asks if I want to replace the directory on the first attempt, which I think is the intended behavior.
A file or folder with the name 'test123' already exists in the destination folder. Do you want to replace it?
This action is irreversible!
Thank you for your reply.
Is there an existing issue for this?
OS/Web Information
code-server --version
:v4.22.1Steps to Reproduce
1.Open code-server in my browser(Microsoft Edge) 2.Create a directory named test123 in the remote terminal, at this point, a directory named test123 appears in the resource manager 3.Create a file called test123 in local 4.Drag the local test123 file to the resource manager in the code-server code-server will report an error, indicating that it cannot write to a file that is actually a directory Repeat step 4, again and again (Translated by Google)
Expected
code-server should report an error, indicating that it cannot write to a file that is actually a directory![f57c9378b80e704d1cedc040852f71f48597734d9ad8e1e1a716c804cce4980cQzpcVXNlcnNcYWRtaW5cQXBwRGF0YVxSb2FtaW5nXERpbmdUYWxrXDYyMjE2NTMwMl92MlxJbWFnZUZpbGVzXDE3MTgzNDQyMzQyMTFfODQwOUExN0QtOUNENC00MjBiLUE1QzUtNTAwMTcyQ0FBMDIwLnBuZw==](https://github.com/coder/code-server/assets/17474618/c5a1ebe0-5867-4dc8-a601-fe7ecc09963c)
Actual
After multiple attempts, the code-server pops up a dialog box asking if you want to replace the file If you click replace, the remote test123 directory will be overwritten with the local test123 file, and the test123 directory will be deleted![e10e1b030e3a83c60c6cd3b204fdab0aed237452184e9c4ba7bbde69e543537fQzpcVXNlcnNcYWRtaW5cQXBwRGF0YVxSb2FtaW5nXERpbmdUYWxrXDYyMjE2NTMwMl92MlxJbWFnZUZpbGVzXDE3MTgzNDQxNTUzNTdfMEE4NzBCOTItNEI1OS00ZWYwLTkzNUUtNzM3OUQ4OUJDRUU4LnBuZw==](https://github.com/coder/code-server/assets/17474618/e311f127-0cf7-4b12-8656-17c3f7a43d6f)
Logs
No response
Screenshot/Video
/
Does this bug reproduce in native VS Code?
I did not test native VS Code
Does this bug reproduce in GitHub Codespaces?
I did not test GitHub Codespaces
Are you accessing code-server over a secure context?
Notes
I use Google Translate, and if you need help, I will do my best to provide it