diff options
author | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-14 18:34:12 -0500 |
---|---|---|
committer | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-14 18:34:12 -0500 |
commit | 9340885251e7791ee5a03f2b75e168f341e231e5 (patch) | |
tree | 86b4a189f01a1c114f5bb9e48d33e09a731953b0 /compiler/modulepaths.nim | |
parent | 4e305c304014c5ef90413d6cab562f5e2b34e573 (diff) | |
parent | b9dc486db15bb1b4b6f3cef7626733b904d377f7 (diff) | |
download | Nim-9340885251e7791ee5a03f2b75e168f341e231e5.tar.gz |
Merge remote-tracking branch 'upstream/devel' into test-7010
Diffstat (limited to 'compiler/modulepaths.nim')
-rw-r--r-- | compiler/modulepaths.nim | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/modulepaths.nim b/compiler/modulepaths.nim index 118002fcf..f0718c4eb 100644 --- a/compiler/modulepaths.nim +++ b/compiler/modulepaths.nim @@ -7,9 +7,8 @@ # distribution, for details about the copyright. # -import ast, renderer, strutils, msgs, options, idents, os, lineinfos - -import nimblecmd +import ast, renderer, strutils, msgs, options, idents, os, lineinfos, + pathutils, nimblecmd when false: const @@ -160,7 +159,7 @@ proc checkModuleName*(conf: ConfigRef; n: PNode; doLocalError=true): FileIndex = # This returns the full canonical path for a given module import let modulename = getModuleName(conf, n) let fullPath = findModule(conf, modulename, toFullPath(conf, n.info)) - if fullPath.len == 0: + if fullPath.isEmpty: if doLocalError: let m = if modulename.len > 0: modulename else: $n localError(conf, n.info, "cannot open file: " & m) |