Skip to content

Commit bea2e15

Browse files
committed
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.
1 parent c7b8073 commit bea2e15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/js2c.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ def JS2C(source, target):
288288
lines = ExpandMacros(lines, macros)
289289
lines = CompressScript(lines, do_jsmin)
290290
data = ToCArray(s, lines)
291-
id = (os.path.split(str(s))[1])[:-3]
291+
id = os.path.basename(str(s)).split('.')[0]
292292
if delay: id = id[:-6]
293293
if delay:
294294
delay_ids.append((id, len(lines)))

0 commit comments

Comments
 (0)