bugfix: delete files with special chars in ConfigFilesPanel

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2020-12-30 22:53:42 +01:00
parent d74e38d0ba
commit 6856c9a99f

View File

@ -453,14 +453,7 @@
}, 'files/getMove');
},
removeFile() {
let filename = (this.currentPath+"/"+this.contextMenu.item.filename);
axios.delete(
'//'+ this.hostname + ':' + this.port +'/server/files/'+filename
).then((result) => {
this.$toast.success(result.data.result+" successfully deleted.");
}).catch(() => {
this.$toast.error("Error! Cannot delete file.");
});
this.$socket.sendObj('server.files.delete_file', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteFile');
},
deleteDirectoryAction: function() {
this.$socket.sendObj('server.files.delete_directory', { path: this.currentPath+"/"+this.contextMenu.item.filename }, 'files/getDeleteDir');