fix: copying files with special characters
This commit is contained in:
parent
ba7e71a7c3
commit
20ebbf6611
|
@ -151,13 +151,13 @@ export default {
|
||||||
for (let i of this.selected) {
|
for (let i of this.selected) {
|
||||||
items.push({
|
items.push({
|
||||||
from: this.req.items[i].url,
|
from: this.req.items[i].url,
|
||||||
to: this.url + this.req.items[i].name,
|
to: this.url + encodeURIComponent(this.req.items[i].name),
|
||||||
name: this.req.items[i].name,
|
name: this.req.items[i].name,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
let base = el.querySelector(".name").innerHTML + "/";
|
// Get url from ListingItem instance
|
||||||
let path = this.$route.path + base;
|
let path = el.__vue__.url;
|
||||||
let baseItems = (await api.fetch(path)).items;
|
let baseItems = (await api.fetch(path)).items;
|
||||||
|
|
||||||
let action = (overwrite, rename) => {
|
let action = (overwrite, rename) => {
|
||||||
|
|
|
@ -492,7 +492,7 @@ export default {
|
||||||
for (let i of this.selected) {
|
for (let i of this.selected) {
|
||||||
items.push({
|
items.push({
|
||||||
from: this.req.items[i].url,
|
from: this.req.items[i].url,
|
||||||
name: encodeURIComponent(this.req.items[i].name),
|
name: this.req.items[i].name,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -517,7 +517,7 @@ export default {
|
||||||
const from = item.from.endsWith("/")
|
const from = item.from.endsWith("/")
|
||||||
? item.from.slice(0, -1)
|
? item.from.slice(0, -1)
|
||||||
: item.from;
|
: item.from;
|
||||||
const to = this.$route.path + item.name;
|
const to = this.$route.path + encodeURIComponent(item.name);
|
||||||
items.push({ from, to, name: item.name });
|
items.push({ from, to, name: item.name });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -639,22 +639,20 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let base = "";
|
let files = await upload.scanFiles(dt);
|
||||||
|
let items = this.req.items;
|
||||||
|
let path = this.$route.path.endsWith("/")
|
||||||
|
? this.$route.path
|
||||||
|
: this.$route.path + "/";
|
||||||
|
|
||||||
if (
|
if (
|
||||||
el !== null &&
|
el !== null &&
|
||||||
el.classList.contains("item") &&
|
el.classList.contains("item") &&
|
||||||
el.dataset.dir === "true"
|
el.dataset.dir === "true"
|
||||||
) {
|
) {
|
||||||
base = el.querySelector(".name").innerHTML + "/";
|
// Get url from ListingItem instance
|
||||||
}
|
path = el.__vue__.url;
|
||||||
|
|
||||||
let files = await upload.scanFiles(dt);
|
|
||||||
let path = this.$route.path.endsWith("/")
|
|
||||||
? this.$route.path + base
|
|
||||||
: this.$route.path + "/" + base;
|
|
||||||
let items = this.req.items;
|
|
||||||
|
|
||||||
if (base !== "") {
|
|
||||||
try {
|
try {
|
||||||
items = (await api.fetch(path)).items;
|
items = (await api.fetch(path)).items;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
Loading…
Reference in New Issue