Fix move for UTF8 chars

pull/144/head
Henrique Dias 2017-07-01 09:34:51 +01:00
parent 5fd7429d5d
commit 4efdf9c547
No known key found for this signature in database
GPG Key ID: 936F5EB68D786730
2 changed files with 2 additions and 2 deletions

View File

@ -87,7 +87,7 @@ export default {
let url = this.req.data.items[i].url let url = this.req.data.items[i].url
let name = this.req.data.items[i].name let name = this.req.data.items[i].name
promises.push(webdav.move(url, this.url + name)) promises.push(webdav.move(url, this.url + encodeURIComponent(name)))
} }
Promise.all(promises) Promise.all(promises)

View File

@ -67,7 +67,7 @@ export default {
for (let item of this.selected) { for (let item of this.selected) {
let from = this.req.data.items[item].url let from = this.req.data.items[item].url
let to = dest + '/' + this.req.data.items[item].name let to = dest + '/' + encodeURIComponent(this.req.data.items[item].name)
to = to.replace('//', '/') to = to.replace('//', '/')
promises.push(webdav.move(from, to)) promises.push(webdav.move(from, to))