From 8ef2b95a45b3afcd9304abc4359fd267934ff284 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Tue, 23 Jan 2018 09:02:36 -0800 Subject: [PATCH] Fix lsDocumentUri::GetPath on Windows --- src/language_server_api.cc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/language_server_api.cc b/src/language_server_api.cc index 390e2b63..08f3f6b5 100644 --- a/src/language_server_api.cc +++ b/src/language_server_api.cc @@ -229,12 +229,9 @@ void lsDocumentUri::SetPath(const std::string& path) { } std::string lsDocumentUri::GetPath() const { - // c:/Program%20Files%20%28x86%29/Microsoft%20Visual%20Studio%2014.0/VC/include/vcruntime. - // C:/Program Files (x86) - - std::string ret; if (raw_uri.compare(0, 8, "file:///")) - return ret; + return raw_uri; + std::string ret; #ifdef _WIN32 size_t i = 8; #else @@ -250,11 +247,6 @@ std::string lsDocumentUri::GetPath() const { } else ret.push_back(raw_uri[i] == '\\' ? '/' : raw_uri[i]); } - -#if defined(_WIN32) -// std::transform(result.begin(), result.end(), result.begin(), ::tolower); -#endif - return ret; }