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.
pull/24503/head
Nathan Rajlich 2012-03-13 18:31:04 -07:00 committed by Ben Noordhuis
parent 1e577f347b
commit 0965d2d9f6
1 changed files with 1 additions and 1 deletions

View File

@ -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)))