Skip to content

Commit be28b40

Browse files
committed
fix(project-page): fix delete directory logic for sub folders
1 parent c11b751 commit be28b40

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

features/ProjectTable/buttons/DeleteDirectoryButton.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ export const DeleteDirectoryButton = ({
2727

2828
const onDelete = async () => {
2929
try {
30-
await deletePath({ params: { project_id: projectId, path: path + directoryName } });
30+
await deletePath({
31+
params: {
32+
project_id: projectId,
33+
path: path.endsWith("/") ? path + directoryName : path + "/" + directoryName,
34+
},
35+
});
3136
await queryClient.invalidateQueries({
3237
queryKey: getGetFilesQueryKey({ project_id: projectId, path }),
3338
});

0 commit comments

Comments
 (0)