From: Stephen Smith Date: Fri, 17 Mar 2023 01:09:30 +0000 (-0400) Subject: 20029: Fix file remove context menu passing collection uuid with file path to delete... X-Git-Tag: 2.6.0~10^2~2 X-Git-Url: https://git.arvados.org/arvados-workbench2.git/commitdiff_plain/9d2d11ffcf56ab3075fac66ac75d91448b4d8ea6 20029: Fix file remove context menu passing collection uuid with file path to delete method Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts index e35c1560..547f1534 100644 --- a/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts +++ b/src/store/collection-panel/collection-panel-files/collection-panel-files-actions.ts @@ -65,10 +65,11 @@ export const removeCollectionsSelectedFiles = () => export const FILE_REMOVE_DIALOG = 'fileRemoveDialog'; -export const openFileRemoveDialog = (filePath: string) => +export const openFileRemoveDialog = (fileUuid: string) => (dispatch: Dispatch, getState: () => RootState) => { - const file = getNodeValue(filePath)(getState().collectionPanelFiles); + const file = getNodeValue(fileUuid)(getState().collectionPanelFiles); if (file) { + const filePath = getFileFullPath(file); const isDirectory = file.type === CollectionFileType.DIRECTORY; const title = isDirectory ? 'Removing directory'