From 207a0779c3509b5109872b9fdb89c277870d89ad Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Tue, 5 Nov 2013 10:28:40 -0800 Subject: [PATCH] Ensuring filename is a plain Python string We don't want to send a unicode string to the user's ycm_extra_conf.py file. This should fix problems with sending the filename to YCM's CompilationDatabase API. --- python/ycm/completers/cpp/clang_completer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ycm/completers/cpp/clang_completer.py b/python/ycm/completers/cpp/clang_completer.py index 26b91d88..1771dfad 100644 --- a/python/ycm/completers/cpp/clang_completer.py +++ b/python/ycm/completers/cpp/clang_completer.py @@ -243,7 +243,7 @@ class ClangCompleter( Completer ): def _FlagsForRequest( self, request_data ): - filename = request_data[ 'filepath' ] + filename = ToUtf8IfNeeded( request_data[ 'filepath' ] ) if 'compilation_flags' in request_data: return PrepareFlagsForClang( request_data[ 'compilation_flags' ], filename )