Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions BrowserSelect/Browser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,11 @@ private static string GetChromeProfileName(string FullProfilePath)
private static List<string> FindChromeProfiles(string ChromeUserDataDir, string IconFilename)
{
List<string> Profiles = new List<string>();
var ProfileDirs = Directory.GetFiles(ChromeUserDataDir, IconFilename, SearchOption.AllDirectories).Select(Path.GetDirectoryName);
foreach (var Profile in ProfileDirs)
var TopLevelDirs = Directory.GetDirectories(ChromeUserDataDir);
foreach (var Dir in TopLevelDirs)
{
Profiles.Add(Profile.Substring(ChromeUserDataDir.Length + 1));
var BaseName = Dir.Substring(ChromeUserDataDir.Length + 1);
if (File.Exists(Dir + "\\" + IconFilename)) { Profiles.Add(BaseName); }
}
return Profiles;
}
Expand Down
2 changes: 1 addition & 1 deletion BrowserSelect/ForegroundAgent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ForegroundAgent
/// also gives said window focus (setForegroundWindow)
/// </summary>
/// <param name="hwnd">hWnd of window to be restored</param>
public static void RestoreWindow(int hwnd)
public static void RestoreWindow(long hwnd)
{

var hWnd = new IntPtr(hwnd);
Expand Down