private static string MakeShortDirName(string longName, BuildDirectoryInfo dir) { if (IsoUtilities.isValidDirectoryName(longName)) { return(longName); } char[] shortNameChars = longName.ToUpper(CultureInfo.InvariantCulture).ToCharArray(); for (int i = 0; i < shortNameChars.Length; ++i) { if (!IsoUtilities.isValidDChar(shortNameChars[i]) && shortNameChars[i] != '.' && shortNameChars[i] != ';') { shortNameChars[i] = '_'; } } return(new string(shortNameChars)); }