示例#1
0
        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));
        }