Skip to content

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

fix: error getting tmb of an entry

Ilian Sapundshiev108615ec664b
diff --git a/src/renderer/perspectives/index.tsx b/src/renderer/perspectives/index.tsx
index fd7d2fadd..92ed0138b 100644
--- a/src/renderer/perspectives/index.tsx
+++ b/src/renderer/perspectives/index.tsx
@@ -15,13 +15,12 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/
-import React from 'react';
-import KanbanPerspectiveIcon from '@mui/icons-material/ViewKanban';
-import MapiquePerspectiveIcon from '@mui/icons-material/Map';
import GalleryPerspectiveIcon from '@mui/icons-material/Camera';
+import FolderVizPerspectiveIcon from '@mui/icons-material/Hub';
+import MapiquePerspectiveIcon from '@mui/icons-material/Map';
+import KanbanPerspectiveIcon from '@mui/icons-material/ViewKanban';
import ListPerspectiveIcon from '@mui/icons-material/ViewList';
import GridPerspectiveIcon from '@mui/icons-material/ViewModule';
-import FolderVizPerspectiveIcon from '@mui/icons-material/Hub';
export const PerspectiveIDs = {
UNSPECIFIED: 'unspecified',
@@ -97,4 +96,3 @@ AvailablePerspectives.push(GalleryPerspectiveMeta);
AvailablePerspectives.push(MapiquePerspectiveMeta);
AvailablePerspectives.push(KanbanPerspectiveMeta);
AvailablePerspectives.push(FolderVizPerspectiveMeta);
-// AvailablePerspectives.push(WikiPerspectiveMeta);
diff --git a/src/renderer/tagspaces.namespace.d.ts b/src/renderer/tagspaces.namespace.d.ts
index 9af96fe1b..f4e0dafd6 100644
--- a/src/renderer/tagspaces.namespace.d.ts
+++ b/src/renderer/tagspaces.namespace.d.ts
@@ -214,6 +214,7 @@ export namespace TS {
href: string;
/**
* Entry id if link from type tslink and id is available
+ * @deprecated
*/
tseid: string;
/**
diff --git a/src/renderer/utils/CommonLocation.ts b/src/renderer/utils/CommonLocation.ts
index a15c29fc5..3364a239c 100644
--- a/src/renderer/utils/CommonLocation.ts
+++ b/src/renderer/utils/CommonLocation.ts
@@ -1,4 +1,5 @@
// import AWS from "aws-sdk";
+import AppConfig from '-/AppConfig';
import { locationType } from '@tagspaces/tagspaces-common/misc';
import {
extractDirectoryName,
@@ -13,11 +14,10 @@ import {
normalizePath,
} from '@tagspaces/tagspaces-common/paths';
import { getUuid, loadJSONString } from '@tagspaces/tagspaces-common/utils-io';
-import AppConfig from '-/AppConfig';
//import * as objectStoreAPI from '@tagspaces/tagspaces-common-aws';
-import * as cordovaIO from '@tagspaces/tagspaces-common-cordova';
-import { TS } from '-/tagspaces.namespace';
import { getFulfilledResults, getMimeType } from '-/services/utils-io';
+import { TS } from '-/tagspaces.namespace';
+import * as cordovaIO from '@tagspaces/tagspaces-common-cordova';
export class CommonLocation implements TS.Location {
uuid: string;
@@ -185,7 +185,7 @@ export class CommonLocation implements TS.Location {
entry: TS.FileSystemEntry,
encoded = false,
): string | undefined => {
- if (!entry) {
+ if (!entry || !entry.path) {
return undefined;
}
return entry.isFile