mirror of
https://github.com/zhom/donutbrowser.git
synced 2026-09-27 11:41:51 +02:00
fix: find wayfern binary
This commit is contained in:
@@ -111,7 +111,15 @@ impl CamoufoxManager {
|
|||||||
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
|
||||||
// Get executable path
|
// Get executable path
|
||||||
let executable_path = if let Some(path) = &config.executable_path {
|
let executable_path = if let Some(path) = &config.executable_path {
|
||||||
PathBuf::from(path)
|
let p = PathBuf::from(path);
|
||||||
|
if p.exists() {
|
||||||
|
p
|
||||||
|
} else {
|
||||||
|
log::warn!("Stored Camoufox executable path does not exist: {path}, falling back to dynamic resolution");
|
||||||
|
BrowserRunner::instance()
|
||||||
|
.get_browser_executable_path(profile)
|
||||||
|
.map_err(|e| format!("Failed to get Camoufox executable path: {e}"))?
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
BrowserRunner::instance()
|
BrowserRunner::instance()
|
||||||
.get_browser_executable_path(profile)
|
.get_browser_executable_path(profile)
|
||||||
@@ -204,7 +212,15 @@ impl CamoufoxManager {
|
|||||||
|
|
||||||
// Get executable path
|
// Get executable path
|
||||||
let executable_path = if let Some(path) = &config.executable_path {
|
let executable_path = if let Some(path) = &config.executable_path {
|
||||||
PathBuf::from(path)
|
let p = PathBuf::from(path);
|
||||||
|
if p.exists() {
|
||||||
|
p
|
||||||
|
} else {
|
||||||
|
log::warn!("Stored Camoufox executable path does not exist: {path}, falling back to dynamic resolution");
|
||||||
|
BrowserRunner::instance()
|
||||||
|
.get_browser_executable_path(profile)
|
||||||
|
.map_err(|e| format!("Failed to get Camoufox executable path: {e}"))?
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
BrowserRunner::instance()
|
BrowserRunner::instance()
|
||||||
.get_browser_executable_path(profile)
|
.get_browser_executable_path(profile)
|
||||||
|
|||||||
@@ -231,7 +231,15 @@ impl WayfernManager {
|
|||||||
config: &WayfernConfig,
|
config: &WayfernConfig,
|
||||||
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<String, Box<dyn std::error::Error + Send + Sync>> {
|
||||||
let executable_path = if let Some(path) = &config.executable_path {
|
let executable_path = if let Some(path) = &config.executable_path {
|
||||||
PathBuf::from(path)
|
let p = PathBuf::from(path);
|
||||||
|
if p.exists() {
|
||||||
|
p
|
||||||
|
} else {
|
||||||
|
log::warn!("Stored Wayfern executable path does not exist: {path}, falling back to dynamic resolution");
|
||||||
|
BrowserRunner::instance()
|
||||||
|
.get_browser_executable_path(profile)
|
||||||
|
.map_err(|e| format!("Failed to get Wayfern executable path: {e}"))?
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
BrowserRunner::instance()
|
BrowserRunner::instance()
|
||||||
.get_browser_executable_path(profile)
|
.get_browser_executable_path(profile)
|
||||||
@@ -400,7 +408,15 @@ impl WayfernManager {
|
|||||||
proxy_url: Option<&str>,
|
proxy_url: Option<&str>,
|
||||||
) -> Result<WayfernLaunchResult, Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<WayfernLaunchResult, Box<dyn std::error::Error + Send + Sync>> {
|
||||||
let executable_path = if let Some(path) = &config.executable_path {
|
let executable_path = if let Some(path) = &config.executable_path {
|
||||||
PathBuf::from(path)
|
let p = PathBuf::from(path);
|
||||||
|
if p.exists() {
|
||||||
|
p
|
||||||
|
} else {
|
||||||
|
log::warn!("Stored Wayfern executable path does not exist: {path}, falling back to dynamic resolution");
|
||||||
|
BrowserRunner::instance()
|
||||||
|
.get_browser_executable_path(profile)
|
||||||
|
.map_err(|e| format!("Failed to get Wayfern executable path: {e}"))?
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
BrowserRunner::instance()
|
BrowserRunner::instance()
|
||||||
.get_browser_executable_path(profile)
|
.get_browser_executable_path(profile)
|
||||||
|
|||||||
Reference in New Issue
Block a user