CodePlexProject Hosting for Open Source Software
An unexpected error has occured.
There is an unsaved comment in progress. You will lose your changes if you continue. Are you sure you want to reopen the work item?
Voted
jfree wrote Apr 9, 2010 at 6:30 PM
d3j409 wrote Oct 26, 2010 at 3:30 PM
ryannewington wrote Mar 11, 2011 at 4:47 AM
private static string AddLongPathPrefix(string path) { if (path.StartsWith (@"\\")) { // if we have been passed a UNC style path (server) prepend \\?\UNC\ but we need to replace the \\ with a single \ return NativeMethods.LongPathUNCPrefix + path.Substring(2); } else //assume a standard path (ie C:\windows) and prepend \\?\ to it { return NativeMethods.LongPathPrefix + path; } } internal static string RemoveLongPathPrefix(string normalizedPath) { if (normalizedPath.StartsWith(NativeMethods.LongPathUNCPrefix)) // if we have been supplied a path with the \\?\UNC\ prefix { return @"\\" + normalizedPath.Substring(NativeMethods.LongPathUNCPrefix.Length); } else if (normalizedPath.StartsWith(NativeMethods.LongPathPrefix)) // if we have been supplied with the \\?\ prefix { return normalizedPath.Substring(NativeMethods.LongPathPrefix.Length); } return normalizedPath; }
Sign in to add a comment or to set email notifications
Keyboard shortcuts are available for this page.