From f198a94f71339f0b17b09f930107ab2884f4d7fd Mon Sep 17 00:00:00 2001 From: Phap Dieu Duong Date: Sun, 9 Mar 2025 13:10:31 +0800 Subject: [PATCH] support following sort order from saved search file: `.search-ms` #404 --- Source/ImageGlass/FrmMain.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/ImageGlass/FrmMain.cs b/Source/ImageGlass/FrmMain.cs index dd1e0610d..49055d183 100644 --- a/Source/ImageGlass/FrmMain.cs +++ b/Source/ImageGlass/FrmMain.cs @@ -556,12 +556,12 @@ public void LoadImageList( // check if we should load images from foreground window var inputImageDirPath = Path.GetDirectoryName(InputImagePathFromArgs) ?? ""; var isFromSearchWindow = Program.ForegroundShellPath.StartsWith(EggShell.SEARCH_MS_PROTOCOL, StringComparison.OrdinalIgnoreCase); + var isFromSavedSearch = Program.ForegroundShellPath.EndsWith(".search-ms", StringComparison.OrdinalIgnoreCase); var isFromSameDir = inputImageDirPath.Equals(Program.ForegroundShellPath, StringComparison.OrdinalIgnoreCase); var useForegroundWindow = Program.ForegroundShell != null && !string.IsNullOrEmpty(InputImagePathFromArgs) - && (isFromSearchWindow || isFromSameDir); - + && (isFromSearchWindow || isFromSavedSearch || isFromSameDir); // start finding image files _fileFinder.StartFindingFiles(