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 file uri error #14724

Closed
yanquer opened this issue Jan 15, 2025 · 4 comments
Closed

drag file uri error #14724

yanquer opened this issue Jan 15, 2025 · 4 comments

Comments

@yanquer
Copy link
Contributor

yanquer commented Jan 15, 2025

why create uri with code

if (file.path) {
                            const fileUri = URI.fromComponents({
                                scheme: 'file',
                                path: file.path,
                                authority: '',
                                query: '',
                                fragment: ''
                            });
                            openUri(fileUri);
                        }

in node_modules/@theia/core/src/browser/shell/application-shell.ts, line 576,
rather than URI.fromFilePath ?

image

I use the uri from URI.fromComponents, when I try read content use error uri like file://d%3A%5C.text%5C1.py with FileService , which will convert to error path in node_modules/@theia/filesystem/src/common/remote-file-system-provider.ts, line 472, such as

image

Is it true? Please

@msujew
Copy link
Member

msujew commented Jan 15, 2025

Hey @yanquer, thank you for looking into this. Do you want to provide a fix for this? Also, please provide reproduction steps for the issue this causes.

@yanquer
Copy link
Contributor Author

yanquer commented Jan 20, 2025

Hey @yanquer, thank you for looking into this. Do you want to provide a fix for this? Also, please provide reproduction steps for the issue this causes.

I'm not sure it is need to edit.

in windows, I set a open-new-editer event with open-uri

Image

and register a custom event with

Image

in Mac, nothing error.

in windows, can get error

Image

because uri not right.

@yanquer
Copy link
Contributor Author

yanquer commented Jan 20, 2025

by the way, I edit a PR, if not need , just close it

@yanquer
Copy link
Contributor Author

yanquer commented Jan 20, 2025

by the way, I edit a PR, if not need , just close it

with this PR test,

Image

@msujew msujew closed this as completed Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants