From 2d2043440809583730e43e86a64568e9f8185996 Mon Sep 17 00:00:00 2001 From: Andrew Gee Date: Wed, 30 Apr 2025 11:45:32 +0100 Subject: [PATCH] Check executable path exists before skipping download Came across an issue where the output directory existed but the executable didn't exist, so BrowserFetcher skipped the download. --- lib/PuppeteerSharp/BrowserFetcher.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PuppeteerSharp/BrowserFetcher.cs b/lib/PuppeteerSharp/BrowserFetcher.cs index 0b9059da8..4a5b780f5 100644 --- a/lib/PuppeteerSharp/BrowserFetcher.cs +++ b/lib/PuppeteerSharp/BrowserFetcher.cs @@ -248,7 +248,7 @@ private async Task DownloadAsync(SupportedBrowser browser, str var outputPath = cache.GetInstallationDir(browser, Platform, buildId); - if (new DirectoryInfo(outputPath).Exists) + if (new FileInfo(GetExecutablePath(buildId)).Exists) { var existingBrowser = new InstalledBrowser(cache, browser, buildId, Platform); existingBrowser.PermissionsFixed = RunSetup(existingBrowser);