Пример #1
0
        internal static string NormaliseAsDirectiveOf(this string statement, string parentScript)
        {
            var text = CSharpParser.UserToInternalEscaping(statement);

            if (text.Length > 1 && (text[0] == '.' && text[1] != '.')) // just a single-dot start dir
            {
                text = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(parentScript), text));
            }

            return(Environment.ExpandEnvironmentVariables(text).Trim());
        }