Skip to content

Commit

Permalink
refactor: update to_asset_url comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger committed Sep 23, 2024
1 parent 0ce356d commit 938b5a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/desktop/src/window_factory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,14 @@ impl WindowFactory {
Ok(())
}

/// Converts a config path to a Tauri asset URL.
/// Converts a file path to a Tauri asset URL.
///
/// Returns a string that can be used as a webview URL.
pub fn to_asset_url(config_path: &str) -> String {
pub fn to_asset_url(file_path: &str) -> String {
if cfg!(target_os = "windows") {
format!("http://asset.localhost/{}", config_path)
format!("http://asset.localhost/{}", file_path)
} else {
format!("asset://localhost/{}", config_path)
format!("asset://localhost/{}", file_path)
}
}

Expand Down

0 comments on commit 938b5a9

Please sign in to comment.