From 9b0a50376c5a9804f52206d593e5510df88a3659 Mon Sep 17 00:00:00 2001 From: Jack251970 <1160210343@qq.com> Date: Sat, 21 Feb 2026 20:18:09 +0800 Subject: [PATCH] Clarify exception type in path resolution catch block Updated the catch block in DataLocation.cs to explicitly use System.Exception instead of Exception when handling path resolution errors. This improves code clarity while maintaining the same error handling logic for ArgumentException, NotSupportedException, and PathTooLongException. --- Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs b/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs index 9764a7ab2..802f09492 100644 --- a/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs +++ b/Flow.Launcher.Infrastructure/UserSettings/DataLocation.cs @@ -64,7 +64,7 @@ namespace Flow.Launcher.Infrastructure.UserSettings { return Path.GetFullPath(Path.Combine(Constant.ProgramDirectory, path)); } - catch (Exception ex) when (ex is ArgumentException || + catch (System.Exception ex) when (ex is ArgumentException || ex is NotSupportedException || ex is PathTooLongException) {