From 211c706dad3da17fe9e242a7823d8a85f7c1854b Mon Sep 17 00:00:00 2001 From: AeonLucid Date: Mon, 18 Jul 2016 02:51:55 +0200 Subject: [PATCH] Fix path issues for all languages. --- compile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compile.py b/compile.py index 7592e351b..a0f30bcac 100755 --- a/compile.py +++ b/compile.py @@ -34,9 +34,12 @@ for filename in fnmatch.filter(filenames, '*.proto'): proto_file = os.path.join(root, filename) relative_file_path = proto_file.replace(proto_path, "") - relative_path = relative_file_path.replace(ntpath.basename(proto_file), "") - destination_path = os.path.abspath(out_path + relative_path) + if lang == "csharp": + relative_path = relative_file_path.replace(ntpath.basename(proto_file), "") + destination_path = os.path.abspath(out_path + relative_path) + else: + destination_path = os.path.abspath(out_path) if not os.path.exists(destination_path): os.makedirs(destination_path)