From 789c87523faffb87fd449562631478411ae00330 Mon Sep 17 00:00:00 2001 From: Brian Robbins Date: Mon, 26 Aug 2024 14:17:30 -0700 Subject: [PATCH] Don't fail /buildLayout if SupportFilesDirBase doesn't exist. (#2103) This can occur on machines that haven't ever run PerfView before. --- src/PerfView/Utilities/SupportFiles.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PerfView/Utilities/SupportFiles.cs b/src/PerfView/Utilities/SupportFiles.cs index a6de51296..3eefecfc9 100755 --- a/src/PerfView/Utilities/SupportFiles.cs +++ b/src/PerfView/Utilities/SupportFiles.cs @@ -120,7 +120,11 @@ public static bool UnpackResourcesIfNeeded(bool force = false) // may not be in the EXE itself. if (unpacked || File.Exists(Path.Combine(SupportFileDirBase, "CleanupNeeded"))) { - Cleanup(); + try + { + Cleanup(); + } + 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. } return unpacked;