private static string GetRelativePath(string fullPath)
{
string currentDir = Directory.GetCurrentDirectory();
if (currentDir == null || currentDir.Length == 0)
{
return(fullPath);
}
System.Globalization.CompareInfo compInfo = System.Globalization.CultureInfo.InvariantCulture.CompareInfo;
if (compInfo.IsPrefix(fullPath, currentDir, System.Globalization.CompareOptions.IgnoreCase))
{
return(fullPath.Substring(currentDir.Length + 1));
}
return(fullPath);
}