Vscode-bookmarks: [BUG] Bookmarks on external files doesn't work if located on different drive (Windows only)

Created on 26 Feb 2021  ·  6Comments  ·  Source: alefragnani/vscode-bookmarks

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

bug

All 6 comments

Seems to work for me.

Untitled

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 👍

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

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

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

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LighghtEeloo picture LighghtEeloo  ·  6Comments

ogamal picture ogamal  ·  6Comments

ashmckenzie picture ashmckenzie  ·  5Comments

jing2si picture jing2si  ·  4Comments

919Studios picture 919Studios  ·  4Comments