Skip to content

Commit

Permalink
closes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
pSpitzner committed Feb 6, 2025
1 parent e31f878 commit f4033b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/src/components/common/contextMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ export function TerminalImportAction(props: Partial<ActionProps>) {
}

function _escapePathForBash(path: string) {
return path.replace(/'/g, "'\\''").replace(/\\/g, "\\\\").replace(/ /g, "\\ ");
// escaping path is fishy, but this seems to be the best compromise
// https://stackoverflow.com/questions/1779858/how-do-i-escape-a-string-for-a-shell-command-in-node
return `'${path.replace(/'/g, `'\\''`)}'`;
}

export function UndoImportAction(props: Partial<ActionProps>) {
Expand Down

0 comments on commit f4033b0

Please sign in to comment.