From 3bd6906c800932c944bd037fa20ad8e0474645b0 Mon Sep 17 00:00:00 2001 From: Spencer Stream Date: Tue, 23 Sep 2025 07:19:39 -0500 Subject: [PATCH] Validate iconPath exists --- Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs b/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs index 9f38a64df..011f01ca5 100644 --- a/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs +++ b/Flow.Launcher.Infrastructure/Image/ThumbnailReader.cs @@ -133,8 +133,9 @@ namespace Flow.Launcher.Infrastructure.Image var urlSection = data["InternetShortcut"]; var iconPath = urlSection?["IconFile"]; - if (string.IsNullOrEmpty(iconPath)) + if (!File.Exists(iconPath)) { + // If the IconFile is missing, throw exception to fallback to the default icon throw new FileNotFoundException("Icon file not specified in Internet shortcut (.url) file."); } hBitmap = GetHBitmap(Path.GetFullPath(iconPath), width, height, options);