-
Notifications
You must be signed in to change notification settings - Fork 102
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
Use OS dependant function to get relative path #1596
Conversation
Signed-off-by: Seb Julliand <[email protected]>
@sebjulliand I can pull my Windows machine up tomorrow and give this a try. |
@sebjulliand Works on my Windows machine, but just a though: Before, we were using But I don't think you even need to check if it's Windows to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works but see my comment!
Signed-off-by: Seb Julliand <[email protected]>
You're absolutely right! It is simpler to let |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't been able to test on my Windows machine (I have broken it.. long story), but it does continue to work on my macbook.
I trust that if you feel it works on Windows, and I know it works on Mac, I think a merge would be ok.
A merge it is then! |
Changes
Fixes #1586
On Windows, there is sometimes a case difference in the path's drive letter. For example:
In my case, I could reproduce this by having two workspace folders in my workspace folders in my workspace and running a local action after opening a file from the Search results (like described in #1586).
This PR simply checks the target platform and run the
path.win32.relative
function to get the relative path for local actions if running on Windows.Checklist