Fix auto prepend file:// to offline doc path

This commit is contained in:
Folyd 2024-06-23 12:43:20 -07:00
parent 681e159d2c
commit 1014055803
2 changed files with 2 additions and 2 deletions

2
core

@ -1 +1 @@
Subproject commit b1f68244f8f9a938b3f29fdd3dfb548cd88acb80 Subproject commit 94d784a79113a1cca3b5ce4e83912894281ae137

View file

@ -46,7 +46,7 @@ document.addEventListener('DOMContentLoaded', async function () {
// Replace all "/" to "\" for Windows. // Replace all "/" to "\" for Windows.
path = event.target.value.replaceAll("/", "\\"); path = event.target.value.replaceAll("/", "\\");
} }
if (!path.startsWith("file://")) { if (path.startsWith("/")) {
// Prepend file:// to allow browser open the file url // Prepend file:// to allow browser open the file url
path = "file://" + path; path = "file://" + path;
} }