diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2018-07-31 20:49:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 20:49:50 +0800 |
commit | a658aaaf305e4478b38ef14079f6be37fe79c004 (patch) | |
tree | 6bfee5a6a19348e0f2e0ed527e920d3db1d955a8 /packages | |
parent | 02eb575813564b0586a038cc1229a166cb402146 (diff) | |
parent | 37590d5f5eae9eea9802d260c6afede1e8c969ac (diff) | |
download | dexon-sol-tools-a658aaaf305e4478b38ef14079f6be37fe79c004.tar dexon-sol-tools-a658aaaf305e4478b38ef14079f6be37fe79c004.tar.gz dexon-sol-tools-a658aaaf305e4478b38ef14079f6be37fe79c004.tar.bz2 dexon-sol-tools-a658aaaf305e4478b38ef14079f6be37fe79c004.tar.lz dexon-sol-tools-a658aaaf305e4478b38ef14079f6be37fe79c004.tar.xz dexon-sol-tools-a658aaaf305e4478b38ef14079f6be37fe79c004.tar.zst dexon-sol-tools-a658aaaf305e4478b38ef14079f6be37fe79c004.zip |
Merge pull request #909 from joincivil/ritave/resolver-check-dirs
Fixed the relative resolver not checking if the file can be read in the
Diffstat (limited to 'packages')
-rw-r--r-- | packages/sol-resolver/CHANGELOG.md | 1 | ||||
-rw-r--r-- | packages/sol-resolver/src/resolvers/relative_fs_resolver.ts | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/packages/sol-resolver/CHANGELOG.md b/packages/sol-resolver/CHANGELOG.md index 5d2ee154a..8ff6ce6ed 100644 --- a/packages/sol-resolver/CHANGELOG.md +++ b/packages/sol-resolver/CHANGELOG.md @@ -5,6 +5,7 @@ Edit the package's CHANGELOG.json file only. CHANGELOG + ## v1.0.4 - _July 26, 2018_ * Dependencies updated diff --git a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts b/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts index 77103b8c1..ed96040d3 100644 --- a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts +++ b/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts @@ -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, |