fix: use the right paths since file refactors
This commit is contained in:
parent
6a34ba8fd8
commit
9ae7192035
|
@ -224,7 +224,7 @@ class Flattener {
|
|||
return callback(null, 'Please make sure you specify the contract name as the class name. E.g. SimpleStorage instead of simple_storage.sol');
|
||||
}
|
||||
|
||||
const flattenedContractFile = path.join(OUTPUT_DIR, contract.filename);
|
||||
const flattenedContractFile = path.join(OUTPUT_DIR, path.basename(contract.filename));
|
||||
let flattenedFileExists = false;
|
||||
if (fs.existsSync(flattenedContractFile)) {
|
||||
this.logger.info(`Using the already flattened contract (${flattenedContractFile})`);
|
||||
|
@ -236,7 +236,7 @@ class Flattener {
|
|||
if (flattenedFileExists) {
|
||||
return next();
|
||||
}
|
||||
const file = this.embark.config.contractsFiles.find(file => path.normalize(file.path) === path.normalize(contract.originalFilename));
|
||||
const file = this.embark.config.contractsFiles.find(file => path.normalize(file.path) === path.normalize(contract.filename));
|
||||
this._doFlatten([file], next);
|
||||
},
|
||||
(next) => { // Read the flattened contract
|
||||
|
|
Loading…
Reference in New Issue