mirror of
https://github.com/tauri-apps/tauri.git
synced 2025-01-04 17:18:56 +03:00
This commit is contained in:
parent
40b717edc5
commit
c021968eb8
5
.changes/fix-asset-loading.md
Normal file
5
.changes/fix-asset-loading.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"tauri": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes custom protocol asset loader not decoding the percent-encoded path.
|
@ -55,6 +55,7 @@ http = "0.2"
|
|||||||
state = "0.4"
|
state = "0.4"
|
||||||
bincode = "1.3"
|
bincode = "1.3"
|
||||||
dirs-next = "2.0"
|
dirs-next = "2.0"
|
||||||
|
percent-encoding = "2.1"
|
||||||
|
|
||||||
# FS
|
# FS
|
||||||
base64 = { version = "0.13", optional = true } # also used on the updater
|
base64 = { version = "0.13", optional = true } # also used on the updater
|
||||||
|
@ -406,6 +406,9 @@ impl<P: Params> WindowManager<P> {
|
|||||||
if path.ends_with('/') {
|
if path.ends_with('/') {
|
||||||
path.pop();
|
path.pop();
|
||||||
}
|
}
|
||||||
|
path = percent_encoding::percent_decode(path.as_bytes())
|
||||||
|
.decode_utf8_lossy()
|
||||||
|
.to_string();
|
||||||
let path = if path.is_empty() {
|
let path = if path.is_empty() {
|
||||||
// if the url is `tauri://localhost`, we should load `index.html`
|
// if the url is `tauri://localhost`, we should load `index.html`
|
||||||
"index.html".to_string()
|
"index.html".to_string()
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 4.5 KiB After Width: | Height: | Size: 4.5 KiB |
@ -81,7 +81,7 @@
|
|||||||
|
|
||||||
<main>
|
<main>
|
||||||
<div class="flex row noselect just-around" style="margin=1em;" data-tauri-drag-region>
|
<div class="flex row noselect just-around" style="margin=1em;" data-tauri-drag-region>
|
||||||
<img src="tauri.png" height="60" on:click={onLogoClick} alt="logo" />
|
<img src="tauri logo.png" height="60" on:click={onLogoClick} alt="logo" />
|
||||||
<div>
|
<div>
|
||||||
<a class="dark-link" target="_blank" href="https://tauri.studio/en/docs/getting-started/intro">
|
<a class="dark-link" target="_blank" href="https://tauri.studio/en/docs/getting-started/intro">
|
||||||
Documentation
|
Documentation
|
||||||
|
Loading…
Reference in New Issue
Block a user