summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Russell <gabriel.russell@mongodb.com>2017-06-01 14:43:49 -0400
committerGabriel Russell <gabriel.russell@mongodb.com>2017-06-01 15:41:30 -0400
commita0ddbc70bc5f91ff9e27cd83d16302f99ffbbad7 (patch)
treef5169e6fcb8d8b5982ab7cb8fbe90e6214cc9c2c
parent7c2e1764e52c623cc21876d1bea09a00f6d19da2 (diff)
downloadmongo-a0ddbc70bc5f91ff9e27cd83d16302f99ffbbad7.tar.gz
SERVER-29246 idl compiler supports dots in pathnames
-rw-r--r--buildscripts/idl/idl/compiler.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/buildscripts/idl/idl/compiler.py b/buildscripts/idl/idl/compiler.py
index 6736c2a40f3..358a19c7958 100644
--- a/buildscripts/idl/idl/compiler.py
+++ b/buildscripts/idl/idl/compiler.py
@@ -136,7 +136,7 @@ def _update_import_includes(args, spec, header_file_name):
for resolved_file_name in spec.imports.resolved_imports:
# Guess: the file naming rules are consistent across IDL invocations
- include_h_file_name = resolved_file_name.split('.')[0] + args.output_suffix + ".h"
+ include_h_file_name = os.path.splitext(resolved_file_name)[0] + args.output_suffix + ".h"
if args.output_base_dir:
include_h_file_name = os.path.relpath(
@@ -167,7 +167,7 @@ def compile_idl(args):
args.input_file, args.input_file)
return False
- file_name_prefix = args.input_file.split('.')[0]
+ file_name_prefix = os.path.splitext(args.input_file)[0]
file_name_prefix += args.output_suffix
source_file_name = file_name_prefix + ".cpp"