Fixed the relative resolver not checking if the file can be read in the
first place
This commit is contained in:
@@ -14,7 +14,7 @@ export class RelativeFSResolver extends Resolver {
|
||||
// tslint:disable-next-line:prefer-function-over-method
|
||||
public resolveIfExists(importPath: string): ContractSource | undefined {
|
||||
const filePath = path.join(this._contractsDir, importPath);
|
||||
if (fs.existsSync(filePath)) {
|
||||
if (fs.existsSync(filePath) && !fs.lstatSync(filePath).isDirectory()) {
|
||||
const fileContent = fs.readFileSync(filePath).toString();
|
||||
return {
|
||||
source: fileContent,
|
||||
|
||||
Reference in New Issue
Block a user