Skip to content

Commit 789c875

Browse files
authored
Don't fail /buildLayout if SupportFilesDirBase doesn't exist. (#2103)
This can occur on machines that haven't ever run PerfView before.
1 parent b3130d0 commit 789c875

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/PerfView/Utilities/SupportFiles.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,11 @@ public static bool UnpackResourcesIfNeeded(bool force = false)
120120
// may not be in the EXE itself.
121121
if (unpacked || File.Exists(Path.Combine(SupportFileDirBase, "CleanupNeeded")))
122122
{
123-
Cleanup();
123+
try
124+
{
125+
Cleanup();
126+
}
127+
catch { } // Clean-up may fail if SupportFilesBaseDir doesn't exist. This is especially true if we're running in a custom location or running /buildLayout.
124128
}
125129

126130
return unpacked;

0 commit comments

Comments
 (0)