bugfix: package names should not contain '.'

This commit is contained in:
Araq 2013-10-07 21:36:31 +02:00
commit 9bf32ff72d
2 changed files with 17 additions and 5 deletions

View file

@ -219,8 +219,10 @@ proc getPackageName*(path: string): string =
else:
let x = path.substr(i+1, b-1)
case x.normalize
of "lib", "src", "source", "package", "pckg", "library": b = i
else: return x
of "lib", "src", "source", "package", "pckg", "library", "private":
b = i
else:
return x.replace('.', '_')
result = ""
proc withPackageName*(path: string): string =