Example #1
0
        public string NormalizePath(string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                throw new ArgumentNullException("path");
            }

            if (_sharpCifsFileSystem.IsEnabledForPath(path))
            {
                return(_sharpCifsFileSystem.NormalizePath(path));
            }

            if (path.EndsWith(":\\", StringComparison.OrdinalIgnoreCase))
            {
                return(path);
            }

            return(path.TrimEnd(GetDirectorySeparatorChar(path)));
        }