Skip to content

Commit 76ec022

Browse files
committed
Remove paste into folder functionality
We want to disallow pasting into a folder until we have a good way to detect if the folder contains something we are pasting into it. The plan is to in the future handle conflicts when pasting, then we will revise the paste into folder situation.
1 parent 01dee86 commit 76ec022

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

src/fileActions.jsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -508,16 +508,6 @@ export const fileActions = (path, selected, setSelected, clipboard, setClipboard
508508
title: _("Copy"),
509509
onClick: () => setClipboard([currentPath + selected[0].name]),
510510
},
511-
...(selected[0].type === "dir")
512-
? [
513-
{
514-
id: "paste-into-directory",
515-
title: _("Paste into directory"),
516-
onClick: () => spawnPaste(clipboard, [currentPath + selected[0].name]),
517-
isDisabled: clipboard.length === 0
518-
}
519-
]
520-
: [],
521511
{ type: "divider" },
522512
{
523513
id: "edit-permissions",

test/check-application

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -938,19 +938,6 @@ class TestFiles(testlib.MachineCase):
938938
self.assertEqual(m.execute("head -n 1 /home/admin/newdir/newfile"), "test_text\n")
939939
b.click(".breadcrumb-button:nth-of-type(4)")
940940

941-
# Paste into directory
942-
self.browser.wait_not_present(".pf-c-empty-state")
943-
m.execute("runuser -u admin touch /home/admin/newfile2")
944-
b.click("[data-item='newfile2']")
945-
b.click("#dropdown-menu")
946-
b.click("#copy-item")
947-
b.click("[data-item='newdir']")
948-
b.click("#dropdown-menu")
949-
b.click("#paste-into-directory")
950-
b.mouse("[data-item='newdir']", "dblclick")
951-
b.wait_visible("[data-item='newfile2']")
952-
b.click(".breadcrumb-button:nth-of-type(3)")
953-
954941
@testlib.skipBrowser(".upload_files() doesn't work on Firefox", "firefox")
955942
@testlib.skipImage("Debian-testing has Cockpit 311 without new upload support in fsreplace1", "debian-testing")
956943
def testUpload(self):

0 commit comments

Comments
 (0)