fix: copy/move allow overwrite
This commit is contained in:
8 files changed
+70
-13
No files matched your search
@@ -179,6 +179,7 @@ const drop = async (event: Event) => {
|
||||
to: props.url + encodeURIComponent(fileStore.req?.items[i].name),
|
||||
name: fileStore.req?.items[i].name,
|
||||
size: fileStore.req?.items[i].size,
|
||||
isDir: fileStore.req?.items[i].isDir,
|
||||
modified: fileStore.req?.items[i].modified,
|
||||
overwrite: false,
|
||||
rename: false,
|
||||
@@ -204,7 +205,7 @@ const drop = async (event: Event) => {
|
||||
.catch($showError);
|
||||
};
|
||||
|
||||
const conflict = await upload.checkConflict(items, path);
|
||||
const conflict = await upload.checkConflict(items, path, true);
|
||||
|
||||
if (conflict.length > 0) {
|
||||
layoutStore.showHover({
|
||||
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
const conflict = await upload.checkConflict(items, this.dest);
|
||||
const conflict = await upload.checkConflict(items, this.dest, true);
|
||||
|
||||
if (conflict.length > 0) {
|
||||
this.showHover({
|
||||
|
||||
@@ -123,7 +123,7 @@ export default {
|
||||
});
|
||||
};
|
||||
|
||||
const conflict = await upload.checkConflict(items, this.dest);
|
||||
const conflict = await upload.checkConflict(items, this.dest, true);
|
||||
|
||||
if (conflict.length > 0) {
|
||||
this.showHover({
|
||||
|
||||
@@ -86,7 +86,8 @@ describe("copy and move conflict prompts", () => {
|
||||
isDir: false,
|
||||
}),
|
||||
],
|
||||
"/files/target/"
|
||||
"/files/target/",
|
||||
true
|
||||
);
|
||||
expect(context.showHover).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
@@ -109,7 +110,8 @@ describe("copy and move conflict prompts", () => {
|
||||
isDir: false,
|
||||
}),
|
||||
],
|
||||
"/files/target/"
|
||||
"/files/target/",
|
||||
true
|
||||
);
|
||||
expect(context.showHover).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
|
||||
Reference in new issue
Block a user