use last part of contract file rather than 1st

This commit is contained in:
Aakil Fernandes 2016-01-30 11:40:36 -05:00 committed by Aakil Fernandes
parent 9c3f31e351
commit cb0ac1e3ca
1 changed files with 3 additions and 1 deletions

View File

@ -89,7 +89,9 @@ Compiler.prototype.compile = function(contractFiles) {
var solidity = [], serpent = [];
for (var i = 0; i < contractFiles.length; i++) {
var extension = contractFiles[i].split('.')[1];
var contractParts = contractFiles[i].split('.'),
extension = contractParts[contractParts.length-1]
if (extension === 'sol') {
solidity.push(contractFiles[i]);
}