Skip to content

Commit

Permalink
Merge pull request #1 from BigTear/main
Browse files Browse the repository at this point in the history
让大小写浏览器名称都能使用
  • Loading branch information
zhifengle authored Aug 14, 2022
2 parents a1756cf + 09e252e commit 7bc1885
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/browser/windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ pub struct Chromium {
impl From<&str> for Chromium {
fn from(name: &str) -> Self {
let home_dir = dirs::home_dir().unwrap();
match name {
"Chrome" => Chromium {
match name.to_lowercase().as_ref() {
"chrome" => Chromium {
name: name.to_string(),
profile_path: home_dir.join("AppData/Local/Google/Chrome/User Data/Default/"),
},
"Chrome Beta" => Chromium {
"chrome beta" => Chromium {
name: name.to_string(),
profile_path: home_dir.join("AppData/Local/Google/Chrome Beta/User Data/Default/"),
},
"Chromium" => Chromium {
"chromium" => Chromium {
name: name.to_string(),
profile_path: home_dir.join("AppData/Local/Google/Chromium/User Data/Default/"),
},
"Edge" => Chromium {
"edge" => Chromium {
name: name.to_string(),
profile_path: home_dir.join("AppData/Local/Microsoft/Edge/User Data/Default/"),
},
Expand Down

0 comments on commit 7bc1885

Please sign in to comment.