-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Support opening a file via the CLI starting with "file://" #25987
Comments
cross-check: works on MacOSX Sierra with Version 1.12.1 |
cross-check No. 2: do NOT work with the current insiders Version 1.13.0 |
Cannot reproduce on Ubuntu 16.10, some questions:
|
Hi, thanks for the reply. I'll try that and give you the info when I'm in the office in about an hour. I can tell you that the issue hits all files I tried so far and it work flawless with e.g. opening it in sublime. |
the released version had no errors or anything severe in the console. the insiders version throw some errors. logs attached. The smaller file is from the insiders version from yesterday, the other from today's version. the path it self is correct, though i cannot say if the string composition is because I have very limited knowledge about electron. Hope it helps. -1494312204502.txt Edit: it works with Nautilus from Unity but PCManFM seems to have trouble to pass the argument to the editor correctly? (weird guess) |
Here's the error for this:
Looks like a Maybe you could try editing the desktop entry to write the file path to a file so we can inspect it? Try opening the file
To something like this:
Then inspecting what |
I'll try that when I'm in the office tomorrow. I set up a VM with ubuntu 17.04 and my basic setup and i can reproduce the error there but I have trouble to get that testfile created. It just won't work, idk. No error, nothing. The file just won't be created. If you're interested I can send you that VM somehow (about 5.3 GB). regarding that path, it's pretty weird. /home/kruemling <- that is my home directory but I never saw this as a prefix part to a path /file: <- I assume file is the uri prefix for the path? /media/kruemling/Daten/dev/git/roche-contract-mgmt <- this is the real path to the directory where the package.json is located |
@HerrVoennchen yes please try in the office 😃 if you can't get that to work try tweaking it to give you the info some other way.
|
sry for the delay. stayed sick at home. I tried to get the parameter in my VM since its reproducable there. I wrote a bash script to get that info. %U results in 'file:///media/sebastian/VBOXADDITIONS_5.1.22_115126/64Bit/Readme.txt' I had to use another file since my VM is empty. still curious why in vscode my home path gets in front of the uri prefix. Edit: for consistency here is the match log to that file I tried to open here |
I can reproduce by running this:
Mousing over the file it reads:
So basically the bug is that it doesn't know how to parse |
@bpasero FYI, this might be a one line fix |
Over the why you have to ask the guys from pcmanfm. But it's not that uncommon. And ls is a pretty bad example. All text file opening applications installed on my machines can handle Uri format except vscode. |
I also encountered the problem. My os is Fedora 25 - lxde with pcmanfm. I think the problem is with |
+1 for changing the code.desktop file in the .deb package so it doesn't request a file specification from the file manager that it can't handle. This is presumably easier in the short term than the work for vscode to be updated to handle file:// uris correctly. If there is some long term benefit from passing file paths as URIs then %U it can be reinstituted in code.desktop when supported. I'm not sure why %U would have been specified in the first place, and what potential benefit there is. PCManFM can send a normal file path, by changing to %F in the .desktop file as per #31284 following https://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html |
@cefn thanks for the advice, made the change 😃 |
To verifier: You need PCManFM FileManager installed to reproduce this. |
coincidentally I have one :D |
%U may pass in file:// format which isn't supported. Fixes microsoft#25987
Steps to Reproduce:
The text was updated successfully, but these errors were encountered: