From 7be1c55cf18f927513cc67f55307d48bdb9d7d20 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 24 Nov 2016 09:14:36 +0100 Subject: [PATCH] make tests green again --- compiler/importer.nim | 2 +- compiler/options.nim | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/importer.nim b/compiler/importer.nim index 46e4c159f8..b7e574c629 100644 --- a/compiler/importer.nim +++ b/compiler/importer.nim @@ -169,7 +169,7 @@ proc myImportModule(c: PContext, n: PNode): PSym = if recursion >= 0: var err = "" for i in countup(recursion, L-1): - if i > 0: err.add "\n" + if i > recursion: err.add "\n" err.add toFullPath(c.graph.importStack[i]) & " imports " & toFullPath(c.graph.importStack[i+1]) localError(n.info, "recursive module dependency detected:\n" & err) diff --git a/compiler/options.nim b/compiler/options.nim index f8db3927af..9edafb17a2 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -232,10 +232,10 @@ proc canonicalizePath*(path: string): string = proc shortenDir*(dir: string): string = ## returns the interesting part of a dir - var prefix = getPrefixDir() & DirSep + var prefix = gProjectPath & DirSep if startsWith(dir, prefix): return substr(dir, len(prefix)) - prefix = gProjectPath & DirSep + prefix = getPrefixDir() & DirSep if startsWith(dir, prefix): return substr(dir, len(prefix)) result = dir