|
|
|
|
@ -877,6 +877,8 @@ namespace ICSharpCode.Decompiler.Tests
@@ -877,6 +877,8 @@ namespace ICSharpCode.Decompiler.Tests
|
|
|
|
|
string baseTempName = testName + Tester.GetSuffix(cscOptions); |
|
|
|
|
string tempDir = Path.Combine(Path.GetTempPath(), "ICSharpCode.Decompiler.Tests", baseTempName); |
|
|
|
|
if (Directory.Exists(tempDir)) |
|
|
|
|
{ |
|
|
|
|
void PrepareNewDirName() |
|
|
|
|
{ |
|
|
|
|
int idx = 2; |
|
|
|
|
string newDir; |
|
|
|
|
@ -891,6 +893,23 @@ namespace ICSharpCode.Decompiler.Tests
@@ -891,6 +893,23 @@ namespace ICSharpCode.Decompiler.Tests
|
|
|
|
|
idx++; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
const bool preferOverwrite = true; |
|
|
|
|
if (preferOverwrite) |
|
|
|
|
{ |
|
|
|
|
try |
|
|
|
|
{ |
|
|
|
|
Tester.RepeatOnIOError(() => Directory.Delete(tempDir, true)); |
|
|
|
|
} |
|
|
|
|
catch |
|
|
|
|
{ |
|
|
|
|
PrepareNewDirName(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
PrepareNewDirName(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
Directory.CreateDirectory(tempDir); |
|
|
|
|
|
|
|
|
|
string originalIl = Path.Combine(tempDir, Path.GetFileNameWithoutExtension(exeFile) + ".original.il"); |
|
|
|
|
|