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

fix subst drive paths on Windows #126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

adamkerz
Copy link

On Windows, if you use subst to create a new drive from a subpath of another drive, some software resolves paths back to the previous drive and others don't.

Sublime doesn't, but git does, it appears.

Eg:
D:\development\my_repo\architecture\models.py in Sublime gets turned into C:\d_drive\development\my_repo\architecture\models.py by git. To be more correct, running git rev-parse --show-toplevel returns C:\d_drive\development\my_repo which is clearly NOT a prefix of D:\development\my_repo\architecture\models.py and this breaks the relative file path calc in the RemoteUrlCommands.

@adamkerz
Copy link
Author

Unfortunately, os.path.realpath DIDN'T resolve the path through subst paths until python3.8, so this necessitates an "upgrade" to py3.8, meaning Sublime4+ support only. Technically, the plugin should still work fine on older versions of sublime as the os.path function still exists and the .python-version file is ignored, but the bug won't be fixed on older versions. This is the obscure end of an obscure wedge...

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

Successfully merging this pull request may close these issues.

1 participant