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

Drag and Drop "dotfile" to File Explorer creates file without leading "dot" #67176

Closed
christianzingg opened this issue Jan 27, 2019 · 15 comments
Closed
Assignees
Labels
*as-designed Described behavior is as designed chromium Issues and items related to Chromium confirmed Issue has been confirmed by VS Code Team member file-explorer Explorer widget issues *out-of-scope Posted issue is not in scope of VS Code upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@christianzingg
Copy link

  • VSCode Version: 1.30.2 (user setup)
  • OS Version: Windows_NT x64 10.0.17763

Steps to Reproduce:

  1. Open Folder in VS Code that contains a "dotfile" e.g. ".gitignore", ".env", ".htaccess"
  2. Drag and Drop a "dotfile" to the windows file explorer. The pasted file name does not contain leading "dot" e.g. "gitignore" instead of ".gitignore"

Does this issue occur when all extensions are disabled?: Yes

@isidorn
Copy link
Contributor

isidorn commented Jan 28, 2019

Can you reproduce this with latest vsocde insiders?

@isidorn isidorn added the info-needed Issue requires more information from poster label Jan 28, 2019
@christianzingg
Copy link
Author

Yes, tested with:
Version: 1.31.0-insider (user setup)
Commit: 1b57516
Date: 2019-01-28T06:21:00.148Z

@isidorn
Copy link
Contributor

isidorn commented Mar 14, 2019

Sorry for the slow response.I can not reproduce this.
If you still see this can you please attach a .gif showing this?

@christianzingg
Copy link
Author

Sure - meanwhile with version 1.32.2

  • Folder "C:\Drag" with files ".env" and "test.txt" opened in VSCode
  • Drag&Drop ".env" file to Explorer Folder "C:\Drop"
  • The dropped file is named without leading dot

DragDrop

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2019

I can repro this both on Mac and Win.
I verified that we set the correct dataTransfer, but it seems that the OS or electron somehow deletes the dot.
@bpasero would know more. Might you have an idea why is this happening?

Screenshot 2019-03-15 at 10 22 54

@isidorn isidorn added file-explorer Explorer widget issues under-discussion Issue is under discussion for relevance, priority, approach and removed info-needed Issue requires more information from poster labels Mar 15, 2019
@bpasero
Copy link
Member

bpasero commented Mar 15, 2019

@isidorn that is not the transfer relevant for the native explorer, can you check this line instead:

event.dataTransfer.setData(DataTransfers.DOWNLOAD_URL, [MIME_BINARY, basename(firstSource.resource), firstSource.resource.toString()].join(':'));

@oliverholliday
Copy link

This also happens when dragging from VSCode to Directory Opus so I don't think it's specifically an Explorer bug.

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2019

@bpasero that line looks decent. The basename correctly returns .env. However after that line is exectued I am not sure how to check the data in the event.dataTransfer content. Whatever I check in chrome dev tools it does not have the actual data
So let me know if you would like me to check something precisely, I feel like I am walking in the dark here.

Screenshot 2019-03-15 at 12 48 41

@bpasero
Copy link
Member

bpasero commented Mar 15, 2019

@isidorn this could easily be an Electron issue, so the easiest would be to spin up Electron Fiddle and just try to reproduce with a simple test case that involves a file with leading dot.

@isidorn
Copy link
Contributor

isidorn commented Mar 15, 2019

@christianzingg This is an electron issue. I was kind enough and filled this electron/electron#17394

@isidorn isidorn added electron Issues and items related to Electron and removed under-discussion Issue is under discussion for relevance, priority, approach labels Mar 15, 2019
@isidorn isidorn added this to the Backlog milestone Mar 15, 2019
@bpasero bpasero added the upstream Issue identified as 'upstream' component related (exists outside of VS Code) label Mar 15, 2019
@bpasero bpasero removed this from the Backlog milestone Mar 15, 2019
@bpasero bpasero added the upstream-issue-linked This is an upstream issue that has been reported upstream label Oct 10, 2019
@wmertens
Copy link

Triage: the linked electron issue was closed without resolution on account of the age. Perhaps it should be reopened if this wasn't fixed by newer electron releases?

@isidorn
Copy link
Contributor

isidorn commented Jun 23, 2020

@wmertens If you can please create a new issue in the electron repository.

@wmertens
Copy link

@isidorn if you can reproduce it in a recent version, you should be able to reopen your original issue. I was just doing a drive-by triage

@deepak1556
Copy link
Collaborator

Issue is in chromium runtime and is present in recent versions as well.

@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member chromium Issues and items related to Chromium and removed electron Issues and items related to Electron upstream-issue-linked This is an upstream issue that has been reported upstream labels Dec 12, 2022
@deepak1556 deepak1556 added the *out-of-scope Posted issue is not in scope of VS Code label Dec 12, 2023
@vscodenpa
Copy link

We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.

If you wonder what we are up to, please see our roadmap and issue reporting guidelines.

Thanks for your understanding, and happy coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale Dec 12, 2023
@deepak1556 deepak1556 added *as-designed Described behavior is as designed and removed bug Issue identified by VS Code Team member as probable bug labels Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
*as-designed Described behavior is as designed chromium Issues and items related to Chromium confirmed Issue has been confirmed by VS Code Team member file-explorer Explorer widget issues *out-of-scope Posted issue is not in scope of VS Code upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

8 participants