From 35c090e7c32c8f52ee9f4e3c463bdf962117a4a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20M=C3=BCller?= Date: Wed, 21 Jun 2017 10:00:35 +0200 Subject: [PATCH] Put full path in quotes --- src/libclang/preprocessor.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/libclang/preprocessor.cpp b/src/libclang/preprocessor.cpp index 69292bb..9b40e49 100644 --- a/src/libclang/preprocessor.cpp +++ b/src/libclang/preprocessor.cpp @@ -25,6 +25,11 @@ namespace ts = type_safe; namespace { + std::string quote(std::string str) + { + return '"' + std::move(str) + '"'; + } + // build the command that runs the preprocessor std::string get_command(const libclang_compile_config& c, const char* full_path) { @@ -56,7 +61,7 @@ namespace } // add path to file being processed - cmd += full_path; + cmd += quote(full_path); return cmd; }