20029: Fix file remove context menu passing collection uuid with file path to delete...
[arvados-workbench2.git] / src / store / collection-panel / collection-panel-files / collection-panel-files-actions.ts
index e35c1560bfee12cedae8892e837b47091d9ccb96..547f1534d111d6bc7d99b716b8891b7dff5d8359 100644 (file)
@@ -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'