1
0
mirror of https://github.com/twiglet/cs2j.git synced 2025-01-18 13:15:17 +01:00

deal better with classes in no namespace

This commit is contained in:
Kevin Glynn 2011-06-14 09:35:13 +02:00
parent 6cdea283b1
commit b3de6b13a0

View File

@ -465,7 +465,7 @@ namespace Twiglet.CS2J.Translator
CommonTree typeAST = javaMaker.CUMap[typeName].Tree;
string claName = typeName.Substring(typeName.LastIndexOf('.')+1);
string nsDir = typeName.Substring(0,typeName.LastIndexOf('.')).Replace('.', Path.DirectorySeparatorChar);
string nsDir = typeName.LastIndexOf('.') >= 0 ? typeName.Substring(0,typeName.LastIndexOf('.')).Replace('.', Path.DirectorySeparatorChar) : "";
if (cfg.CheatDir != "")
{