Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<Copyright>$(CopyrightNetFoundation)</Copyright>
<PackageThirdPartyNoticesFile>$(MSBuildThisFileDirectory)THIRD-PARTY-NOTICES.TXT</PackageThirdPartyNoticesFile>
<PackageReleaseNotes>https://go.microsoft.com/fwlink/?LinkID=799421</PackageReleaseNotes>
<PackageReleaseNotes>https://github.com/dotnet/core/tree/main/release-notes</PackageReleaseNotes>
<IsPrivateAssembly>$(MSBuildProjectName.Contains('Private'))</IsPrivateAssembly>
<!-- Private packages should not be stable -->
<SuppressFinalPackageVersion Condition="'$(SuppressFinalPackageVersion)' == '' and $(IsPrivateAssembly)">true</SuppressFinalPackageVersion>
Expand Down
39 changes: 30 additions & 9 deletions src/installer/tests/AppHost.Bundle.Tests/BundledAppWithSubDirs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,22 @@ private static void DeleteExtractionDirectory(CommandResult result)
return;

string extractionDir = match.Groups[1].Value;
try
for (int i = 0; i < 3; i++)
{
Directory.Delete(extractionDir, true);
}
catch (Exception ex)
{
Console.WriteLine($"Failed to delete extraction directory '{extractionDir}': {ex}");
try
{
if (Directory.Exists(extractionDir))
Directory.Delete(extractionDir, true);
break;
}
catch (Exception ex) when (i < 2)
{
System.Threading.Thread.Sleep(100);
}
catch (Exception ex)
{
Console.WriteLine($"Failed to delete extraction directory '{extractionDir}': {ex}");
}
}
}

Expand Down Expand Up @@ -187,10 +196,22 @@ public static void AddLongNameContent(string directory)
// This prevents git-clone of the repo from failing if long-file-name support is not enabled on windows.
var longDirName = "This is a really, really, really, really, really, really, really, really, really, really, really, really, really, really long file name for punctuation";
var longDirPath = Path.Combine(directory, "Sentence", longDirName);
Directory.CreateDirectory(longDirPath);
using (var writer = File.CreateText(Path.Combine(longDirPath, "word")))

for (int i = 0; i < 3; i++)
{
writer.Write(".");
try
{
Directory.CreateDirectory(longDirPath);
using (var writer = File.CreateText(Path.Combine(longDirPath, "word")))
{
writer.Write(".");
}
break;
}
catch (IOException) when (i < 2)
{
System.Threading.Thread.Sleep(100);
}
}
}
}
Expand Down
Loading