mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-13 09:12:08 -04:00
fix(notepad): decode path URI when saving/creating a file (#1805)
This commit is contained in:
@@ -282,7 +282,7 @@ Item {
|
|||||||
|
|
||||||
onFileSelected: path => {
|
onFileSelected: path => {
|
||||||
root.fileDialogOpen = false;
|
root.fileDialogOpen = false;
|
||||||
const cleanPath = path.toString().replace(/^file:\/\//, '');
|
const cleanPath = decodeURI(path.toString().replace(/^file:\/\//, ''));
|
||||||
const fileName = cleanPath.split('/').pop();
|
const fileName = cleanPath.split('/').pop();
|
||||||
const fileUrl = "file://" + cleanPath;
|
const fileUrl = "file://" + cleanPath;
|
||||||
|
|
||||||
|
|||||||
@@ -358,7 +358,7 @@ Singleton {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createEmptyFile(path, callback) {
|
function createEmptyFile(path, callback) {
|
||||||
var cleanPath = path.toString()
|
var cleanPath = decodeURI(path.toString())
|
||||||
|
|
||||||
if (!cleanPath.startsWith("/")) {
|
if (!cleanPath.startsWith("/")) {
|
||||||
cleanPath = baseDir + "/" + cleanPath
|
cleanPath = baseDir + "/" + cleanPath
|
||||||
|
|||||||
Reference in New Issue
Block a user