Skip to content

Commit 22a0df2

Browse files
committed
只有调试下才打开图片
1 parent 8972041 commit 22a0df2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/MediaConverters/MediaConverters.Tests/Framework/TestHelper.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ public static void OpenFileInExplorer(string filePath)
3131
{
3232
if (File.Exists(filePath))
3333
{
34-
Process.Start(new ProcessStartInfo("explorer", $"\"{filePath}\"") { UseShellExecute = true });
34+
#if DEBUG
35+
if (Debugger.IsAttached)
36+
{
37+
Process.Start(new ProcessStartInfo("explorer", $"\"{filePath}\"") { UseShellExecute = true });
38+
}
39+
#endif
3540
}
3641
else
3742
{

0 commit comments

Comments
 (0)