Skip to content

Commit

Permalink
WP-865 - sending file to trash in shared workspaces
Browse files Browse the repository at this point in the history
  • Loading branch information
chandra-tacc committed Feb 4, 2025
1 parent 44e2dff commit f5b2ff4
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,18 @@ const DataFilesToolbar = ({ scheme, api }) => {
}
};

const homeDir = selectedSystem?.homeDir;

const trashCallback = useCallback(() => {
// Specific handling for shared workspaces.
const homeDir = selectedSystem?.homeDir || '';
const destSystem = selectedSystem?.system || selectedFiles[0]?.system;
if (!destSystem) return;

trash({
destSystem: selectedSystem.system,
homeDir: homeDir,
destSystem,
homeDir,
callback: reloadPage,
});
}, [selectedFiles, reloadPage, status]);
}, [selectedFiles, selectedSystem, reloadPage, status]);

const empty = () => {
dispatch({
Expand Down

0 comments on commit f5b2ff4

Please sign in to comment.