Skip to content

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

fix: optimizing setting the thumb for the parent directory

Ilian Sapundshiev49e95086dc6b
diff --git a/app/components/menus/DirectoryMenu.tsx b/app/components/menus/DirectoryMenu.tsx
index 357fb1f26..50dc0943a 100644
--- a/app/components/menus/DirectoryMenu.tsx
+++ b/app/components/menus/DirectoryMenu.tsx
@@ -343,8 +343,8 @@ Do you want to continue?`)
props.directoryPath,
PlatformIO.getDirSeparator()
);
- const directoryName = extractDirectoryName(
- props.directoryPath,
+ const parentDirectoryName = extractDirectoryName(
+ parentDirectoryPath,
PlatformIO.getDirSeparator()
);
@@ -357,7 +357,7 @@ Do you want to continue?`)
parentDirectoryPath,
PlatformIO.getDirSeparator()
),
- i18n.t('core:thumbAlreadyExists', { directoryName })
+ i18n.t('core:thumbAlreadyExists', { directoryName: parentDirectoryName })
)
.then(() => {
props.showNotification(
@@ -483,7 +483,7 @@ Do you want to continue?`)
<ListItemText primary={i18n.t('core:addFiles')} />
</MenuItem>
)}
- {Pro && props.selectedEntries.length < 2 && (
+ {Pro && props.perspectiveMode && props.selectedEntries.length < 2 && (
<MenuItem data-tid="setAsThumbTID" onClick={setFolderThumbnail}>
<ListItemIcon>
<ImageIcon />