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

[BUG] Bookmarks on external files doesn't work if located on different drive (Windows only) #397

Open
jbengineer opened this issue Feb 26, 2021 · 7 comments
Labels
bug schemes Related to the Uri.scheme concept

Comments

@jbengineer
Copy link

I tried [13.0.2] 2021-02-25 , and the book toggle , if the file is not included in the explorer , does not work.

Just open an outside file , and try to book mark any line, It does not work.
but if the code file is included, in the project/explorer , the book works without an any issue

@fade2gray
Copy link
Contributor

Seems to work for me.

Untitled

@alefragnani
Copy link
Owner

Hi @gbil-sys ,

Are you using Windows, opening the external file from a different drive than the folder you opened in VS Code?

I mean, you open a folder in D: but the file is from C:, or vice-versa?

As @fade2gray reported, it is working, for me too, but I could reproduce an error while doing that different location scenario. On MacOS I had no issue using files from a different device.

Hope this helps

ps. @fade2gray, thanks for testing 👍

@jbengineer
Copy link
Author

Hello @alefragnani
Thanks a lot for your response. I have done further troubleshooting on this issue. I am on a windows system and using subst command to map a local folder to a drive letter N:. The vscode is confused between C:\home\working directory and N:. Any time I am opening a file from N: drive, it does not show a bookmark but adds a big ///////////////////////////////////n:// in the "BOOKMARKS: explore" and bookmark does not work.

I tried to reproduce this after removing the drive mapping but this issue does not show anymore.

*** Another feature request. Could you please make "BOOKMARK: Explorer" window full link option configurable?
image

@alefragnani
Copy link
Owner

Hi @jbengineer ,

If you use subst, even if you open the same physical folder, VS Code will understand as two different workspaces, so it will save/load different set of bookmarks.

If you open the folder from N:, but then for some reason open a file using the C: notation, it will add a bunch of / because that file will be relative to the current location (../../../../c:/../.. and so on). But, if instead you are open the folder from N: and open a file from the same N�:` location, it shouldn’t do this.

About your request, the link doesn’t display full path if the file is inside the workspace/folder you opened. I’m not in from a my computer right now, but I guess it’s the same behavior VS Code has. I see the full path is important for files outside the opened folder/workspace, but I understand it can be hard to read. Feel free to open a new issue about this request.

Hope this helps

@alefragnani alefragnani changed the title Still BookMark toggle does not work with 13.0.2 , [BUG] Bookmarks on external files doesn't work if located on different drive (Windows only) Mar 11, 2021
@Eugeny48
Copy link

Eugeny48 commented Apr 1, 2021

Are you using Windows, opening the external file from a different drive than the folder you opened in VS Code?

I mean, you open a folder in D: but the file is from C:, or vice-versa?

I have the same issue

@fade2gray
Copy link
Contributor

Despite my earlier comment, I have just discovered that I can't create bookmarks in a file stored anywhere other than on the C:\ drive - not on a different partition on the same physical drive as C:\ (D:) or on a removable drive etc.

@Foo-x
Copy link

Foo-x commented Nov 14, 2023

@alefragnani
I cannot test and contribute because of the private submodule, but I think this issue is probably caused by using Uri.path instead of Uri.fsPath.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug schemes Related to the Uri.scheme concept
Projects
None yet
Development

No branches or pull requests

5 participants