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

Windows paths should use forward slash #35

Open
AbigailBuccaneer opened this issue Mar 14, 2019 · 1 comment · May be fixed by #37
Open

Windows paths should use forward slash #35

AbigailBuccaneer opened this issue Mar 14, 2019 · 1 comment · May be fixed by #37

Comments

@AbigailBuccaneer
Copy link
Owner

When running on Windows, we output paths like "c:\users\...", and \u is interpreted as an escape sequence. We should instead output "c:/users/..." even if the compile_commands.json uses backslashes.

@andrewkwon
Copy link

andrewkwon commented Jun 10, 2020

I believe this issue can be resolved by replacing the return statement of the resolve(path) function on line 96 of __init__.py with the following code:

if sys.platform.startswith('win32'):
    return os.path.normcase(os.path.normpath(path)).replace("\\", "/") # Windows fix so that paths have correct slashes
else:
    return os.path.normcase(os.path.normpath(path))

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 a pull request may close this issue.

2 participants