From 0965d2d9f61f12ea807e81024fc37fe8d29a5a27 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Tue, 13 Mar 2012 18:31:04 -0700 Subject: [PATCH] js2c: fix to support files other than ones ending with 2 char extensions Previously this was basically hard-coded for *.js files, but now we need to include the 'config.gypi' file in there as well. --- tools/js2c.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/js2c.py b/tools/js2c.py index fd8b25b..69ec8a8 100755 --- a/tools/js2c.py +++ b/tools/js2c.py @@ -288,7 +288,7 @@ def JS2C(source, target): lines = ExpandMacros(lines, macros) lines = CompressScript(lines, do_jsmin) data = ToCArray(s, lines) - id = (os.path.split(str(s))[1])[:-3] + id = os.path.basename(str(s)).split('.')[0] if delay: id = id[:-6] if delay: delay_ids.append((id, len(lines))) -- 2.7.4