in AppInstallerFileBuilder/AppInstallerFileBuilderLib/IO/FileSystemUtils.cs [281:308]
public static string PrependLongPathToken(string path)
{
const string UncPathPrefix = @"\\";
const string LongPathPrefixForLocalFiles = @"\\?\";
const string LongPathPrefixForUNCFiles = @"\\?\UNC\";
// We only prepend to rooted paths, not relative paths.
if (Path.IsPathRooted(path))
{
// Only change the path if it's not already formatted for long paths support
if (!path.StartsWith(LongPathPrefixForLocalFiles, StringComparison.OrdinalIgnoreCase) &&
!path.StartsWith(LongPathPrefixForUNCFiles, StringComparison.OrdinalIgnoreCase))
{
if (path.StartsWith(UncPathPrefix, StringComparison.OrdinalIgnoreCase))
{
path = LongPathPrefixForUNCFiles + path.Substring(UncPathPrefix.Length);
}
else
{
path = LongPathPrefixForLocalFiles + path;
}
}
}
Logger.Logger.Log("Log directory path: {0}", path);
return path;
}