Skip to content

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

fix Tmb lost on file rename

sytolk1a6d3076c46b
diff --git a/src/renderer/hooks/IOActionsContextProvider.tsx b/src/renderer/hooks/IOActionsContextProvider.tsx
index 47b9656b1..c0d96a949 100644
--- a/src/renderer/hooks/IOActionsContextProvider.tsx
+++ b/src/renderer/hooks/IOActionsContextProvider.tsx
@@ -1273,7 +1273,7 @@ export const IOActionsContextProvider = ({
newFilePath,
locationID,
undefined,
- reflect,
+ false,
)
.then(() => {
// const newFilePathFromPromise = result[1];
@@ -1310,6 +1310,20 @@ export const IOActionsContextProvider = ({
false,
)
.then(() => {
+ if (reflect) {
+ getAllPropertiesPromise(newFilePath).then(
+ (fsEntry: TS.FileSystemEntry) => {
+ if (reflect) {
+ setReflectActions({
+ action: 'update',
+ entry: fsEntry,
+ oldEntryPath: filePath,
+ });
+ }
+ return fsEntry;
+ },
+ );
+ }
console.info(
'Renaming meta file and thumb successful from ' +
filePath +