diff --git a/client/src/components/DataFiles/DataFilesModals/DataFilesCopyModal.jsx b/client/src/components/DataFiles/DataFilesModals/DataFilesCopyModal.jsx index 4ed064e41..bebffdf3f 100644 --- a/client/src/components/DataFiles/DataFilesModals/DataFilesCopyModal.jsx +++ b/client/src/components/DataFiles/DataFilesModals/DataFilesCopyModal.jsx @@ -81,7 +81,7 @@ const DataFilesCopyModal = React.memo(() => { srcApi: params.api, destApi: modalParams.api, destSystem: system, - destPath: path, + destPath: path || '/', name, callback: reloadPage, }); diff --git a/client/src/components/DataFiles/DataFilesModals/DataFilesModalTables/DataFilesModalListingTable.jsx b/client/src/components/DataFiles/DataFilesModals/DataFilesModalTables/DataFilesModalListingTable.jsx index 4bcce8821..93f318597 100644 --- a/client/src/components/DataFiles/DataFilesModals/DataFilesModalTables/DataFilesModalListingTable.jsx +++ b/client/src/components/DataFiles/DataFilesModals/DataFilesModalTables/DataFilesModalListingTable.jsx @@ -112,7 +112,7 @@ const DataFilesModalButtonCell = ({ operationOnlyForFolders, disabled, }) => { - const onClick = () => operationCallback(system, path || '/', name); + const onClick = () => operationCallback(system, path, name); const formatSupportsOperation = !operationOnlyForFolders || format === 'folder'; return ( diff --git a/client/src/components/DataFiles/DataFilesModals/tests/DataFilesCopyModal.test.js b/client/src/components/DataFiles/DataFilesModals/tests/DataFilesCopyModal.test.js index 63faaadc4..e7bc52bee 100644 --- a/client/src/components/DataFiles/DataFilesModals/tests/DataFilesCopyModal.test.js +++ b/client/src/components/DataFiles/DataFilesModals/tests/DataFilesCopyModal.test.js @@ -69,13 +69,19 @@ describe('DataFilesCopyModal', () => { expect(projectLink).toBeDefined(); expect(store.getActions()).toEqual([ { type: 'GET_SYSTEM_MONITOR' }, - { type: 'PROJECTS_GET_LISTING', payload: { queryString: null, modal: 'copy' } }, + { + type: 'PROJECTS_GET_LISTING', + payload: { queryString: null, modal: 'copy' }, + }, ]); fireEvent.click(projectLink); expect(store.getActions()).toEqual([ { type: 'GET_SYSTEM_MONITOR' }, - { type: 'PROJECTS_GET_LISTING', payload: { queryString: null, modal: 'copy' } }, + { + type: 'PROJECTS_GET_LISTING', + payload: { queryString: null, modal: 'copy' }, + }, { type: 'FETCH_FILES', payload: {