Skip to content

Commit

Permalink
Fix windows paths, these need to bve converted to forward slashes for…
Browse files Browse the repository at this point in the history
… cmake-server
  • Loading branch information
rwols committed Apr 1, 2018
1 parent a4f8ce4 commit 5b26fdd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion commands/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def on_load(cls, view):
else:
# Ask the user what he/she wants.
cls.window.show_quick_panel(cls.items,
cls._on_done_select_scheme)
cls._on_done_select_scheme)

@classmethod
def _on_done_select_scheme(cls, index):
Expand Down Expand Up @@ -308,6 +308,10 @@ def _run_configure_with_new_settings(cls):
else:
print("CMakeBuilder: Warning: Generator", cls.generator,
"will not have syntax highlighting in the output panel.")
# Replace backslashes with forward slashes in paths.
cmake_settings.source_folder = cmake_settings.source_folder.replace("\\", "/")
cmake_settings.build_folder = cmake_settings.build_folder.replace("\\", "/")
cmake_settings.build_folder_pre_expansion = cmake_settings.build_folder_pre_expansion.replace("\\", "/")
else:
sublime.error_message("Unknown platform: " + sublime.platform())
return
Expand Down

0 comments on commit 5b26fdd

Please sign in to comment.