Skip to content

Commit

Permalink
fix(electron): open new window with non-ascii path on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
xyhp915 authored and tiensonqin committed Feb 10, 2021
1 parent 3981224 commit 90cf95e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/electron/electron/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@

(.on web-contents "new-window"
(fn [e url]
(.. logger (info "new-window" url))
(open url)
(let [url (if (string/starts-with? url "file:")
(js/decodeURIComponent url) url)]
(.. logger (info "new-window" url))
(open url))
(.preventDefault e)))

(doto win
Expand Down

0 comments on commit 90cf95e

Please sign in to comment.