Skip to content

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

fix Start tmb generation on copying local file with dnd #2042

Stanimir1e1820ad29f0
diff --git a/src/renderer/components/EntryContainer.tsx b/src/renderer/components/EntryContainer.tsx
index 34e3e9b23..795d9ae3f 100644
--- a/src/renderer/components/EntryContainer.tsx
+++ b/src/renderer/components/EntryContainer.tsx
@@ -40,7 +40,6 @@ import {
extractContainingDirectoryPath,
getBackupFileLocation,
extractFileExtension,
- generateSharingLink,
} from '@tagspaces/tagspaces-common/paths';
import ConfirmDialog from '-/components/dialogs/ConfirmDialog';
import AddRemoveTagsDialog from '-/components/dialogs/AddRemoveTagsDialog';
diff --git a/src/renderer/hooks/ThumbGenerationContextProvider.tsx b/src/renderer/hooks/ThumbGenerationContextProvider.tsx
index 6d193b8c8..850c5beff 100644
--- a/src/renderer/hooks/ThumbGenerationContextProvider.tsx
+++ b/src/renderer/hooks/ThumbGenerationContextProvider.tsx
@@ -23,6 +23,7 @@ import {
extractFileName,
normalizePath,
getMetaDirectoryPath,
+ extractFileExtension,
} from '@tagspaces/tagspaces-common/paths';
import {
getEnableWS,
@@ -211,24 +212,27 @@ export const ThumbGenerationContextProvider = ({
if (!showUnixHiddenEntries && entry.name.startsWith('.')) {
return true;
}
+ const extension = entry.extension
+ ? entry.extension
+ : extractFileExtension(entry.name, location.getDirSeparator());
if (
isWorkerAvailable &&
enableWS &&
- supportedImgsWS.includes(entry.extension) &&
+ supportedImgsWS.includes(extension) &&
!location.haveObjectStoreSupport() &&
!location.haveWebDavSupport()
) {
workerEntries.push(entry.path);
} else if (
- supportedImgs.includes(entry.extension) ||
- supportedContainers.includes(entry.extension) ||
- supportedText.includes(entry.extension) ||
- supportedMisc.includes(entry.extension) ||
- supportedVideos.includes(entry.extension)
+ supportedImgs.includes(extension) ||
+ supportedContainers.includes(extension) ||
+ supportedText.includes(extension) ||
+ supportedMisc.includes(extension) ||
+ supportedVideos.includes(extension)
) {
mainEntries.push(entry.path);
} else {
- console.log('Unsupported thumb generation ext:' + entry.extension);
+ console.log('Unsupported thumb generation ext:' + extension);
}
return true;
});