Terminate copy iteration when hitting in-place nimbleDir (#429)

* terminate copy iteration when hitting in-place nimbleDir; fixes #428

* investigate travis issue

* more investigations

* more investigations

* fix nim version issue
This commit is contained in:
Fabian Keller 2017-12-22 00:15:03 +01:00 committed by Dominik Picheta
commit 209fca53e7
3 changed files with 19 additions and 2 deletions

View file

@ -510,13 +510,13 @@ proc iterInstallFiles*(realDir: string, pkgInfo: PackageInfo,
for kind, file in walkDir(realDir):
if kind == pcDir:
let skip = pkgInfo.checkInstallDir(realDir, file)
if skip: continue
# we also have to stop recursing if we reach an in-place nimbleDir
if file == options.getNimbleDir().expandFilename(): continue
iterInstallFiles(file, pkgInfo, options, action)
else:
let skip = pkgInfo.checkInstallFile(realDir, file)
if skip: continue
action(file)