Fix the base path in desktop builds (#3949)

* Fix the base path in desktop builds

---------

Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
Evan AlmloffandJonathan Kelley authored and GitHub committed 2025-05-07 13:52:56 -07:00
1 parent 0c0f0e96df
commit be01cf1485
4 files changed
+638 -545

No files matched your search

-16
View File
@@ -98,22 +98,6 @@ pub(crate) struct WebAppConfig {
pub(crate) base_path: Option<String>,
}
impl WebAppConfig {
/// Get the normalized base path for the application with `/` trimmed from both ends. If the base path is not set, this will return `.`.
pub(crate) fn base_path(&self) -> &str {
let trimmed_path = self
.base_path
.as_deref()
.unwrap_or_default()
.trim_matches('/');
if trimmed_path.is_empty() {
"."
} else {
trimmed_path
}
}
}
impl Default for WebAppConfig {
fn default() -> Self {
Self {