Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix After duplication only the newly created file should be selected (#2128)

Stanimir2f23b1b6ad0a
diff --git a/src/renderer/hooks/DirectoryContentContextProvider.tsx b/src/renderer/hooks/DirectoryContentContextProvider.tsx
index 1bb2a65c1..c3d9a5aa5 100644
--- a/src/renderer/hooks/DirectoryContentContextProvider.tsx
+++ b/src/renderer/hooks/DirectoryContentContextProvider.tsx
@@ -409,7 +409,9 @@ export const DirectoryContentContextProvider = ({
(entry) => entry.path === action.entry.path,
)
) {
- if (
+ selected.push(action.entry);
+ updated = true;
+ /*if (
!selectedEntries.some(
(entry) => entry.path === action.entry.path,
)
@@ -420,7 +422,7 @@ export const DirectoryContentContextProvider = ({
selected.push(action.entry);
}
updated = true;
- }
+ }*/
}
} else if (action.action === 'delete') {
let index = selectedEntries.findIndex(