Skip to content

Commit b99853c

Browse files
committed
fix: show confirm when copy/cut in sidebar instead of alert
1 parent 262f752 commit b99853c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib/openFolder.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -550,13 +550,13 @@ function execOperation(type, action, url, $target, name) {
550550
const possibleConflictUrl = Url.join(url, itemName);
551551
const doesExist = await fsOperation(possibleConflictUrl).exists();
552552
if (doesExist) {
553-
alert(
554-
strings.error,
553+
let confirmation = await confirm(
554+
strings.warning,
555555
strings["already exists"]
556556
? strings["already exists"].replace("{name}", itemName)
557557
: `"${itemName}" already exists in this location.`,
558558
);
559-
return;
559+
if (!confirmation) return;
560560
}
561561
let newUrl;
562562
if (clipBoard.action === "cut") newUrl = await fs.moveTo(url);

0 commit comments

Comments
 (0)