File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,8 @@ private static dynamic GetActiveExplorer()
44
44
45
45
// find the desired window and make sure that it is indeed a file explorer
46
46
// we don't want the Internet Explorer or the classic control panel
47
- if ( Path . GetFileName ( ( string ) window . FullName ) == "explorer.exe" && new IntPtr ( window . HWND ) == handle )
47
+ // ToLower() is needed, because Windows can report the path as "C:\\Windows\\Explorer.EXE"
48
+ if ( Path . GetFileName ( ( string ) window . FullName ) . ToLower ( ) == "explorer.exe" && new IntPtr ( window . HWND ) == handle )
48
49
{
49
50
return window ;
50
51
}
@@ -53,8 +54,6 @@ private static dynamic GetActiveExplorer()
53
54
return null ;
54
55
}
55
56
56
- // COM Imports
57
-
58
57
[ DllImport ( "user32.dll" ) ]
59
58
private static extern IntPtr GetForegroundWindow ( ) ;
60
59
}
You can’t perform that action at this time.
0 commit comments