TagSpaces is an offline, open source, document manager with tagging support
feat: added support for symlinks
Ilian Sapundshievecbc84c661db
diff --git a/package-lock.json b/package-lock.jsonindex 69811affc..74add8e31 100644--- a/package-lock.json+++ b/package-lock.json@@ -21,11 +21,11 @@"@mui/material": "9.0.1","@mui/x-data-grid": "9.0.4","@mui/x-date-pickers": "9.0.4",- "@tagspaces/tagspaces-common": "4.8.3",- "@tagspaces/tagspaces-common-aws3": "4.8.3",- "@tagspaces/tagspaces-common-cordova": "4.8.3",- "@tagspaces/tagspaces-indexer": "4.8.3",- "@tagspaces/tagspaces-search": "4.8.3",+ "@tagspaces/tagspaces-common": "4.8.5",+ "@tagspaces/tagspaces-common-aws3": "4.8.5",+ "@tagspaces/tagspaces-common-cordova": "4.8.5",+ "@tagspaces/tagspaces-indexer": "4.8.5",+ "@tagspaces/tagspaces-search": "4.8.5","aws-amplify": "4.3.36","coordinate-parser": "1.0.7","crypto-js": "4.2.0",@@ -18553,9 +18553,9 @@}},"node_modules/@tagspaces/tagspaces-common": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.8.3.tgz",- "integrity": "sha512-Vb7kQ7SCeL5daFLSv44Hy3y0DbgHouwVgqTnrfBl/KRLixtDaBhItKNYz8gdtVPTGkOD4I6ochaEUEAZVTnQbA==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.8.5.tgz",+ "integrity": "sha512-04FDYHJmcNTtkee1ms5zWj8g0Jt+s9CGvlsNwXBfMvrOtIV78eyLxXZk/05STuqJWPMR2rOfoVCos8ny5+WUBA==","license": "MIT","dependencies": {"dompurify": "3.3.1",@@ -18566,15 +18566,15 @@}},"node_modules/@tagspaces/tagspaces-common-aws3": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-aws3/-/tagspaces-common-aws3-4.8.3.tgz",- "integrity": "sha512-uYW1Xmm1d6p+nwGzJgR91/c7Jy0pC4UQMyClfn66+Y210bNq7hUgsfPZKMWXktyUB4ZtgGvj2XzQlLGnvZksNQ==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-aws3/-/tagspaces-common-aws3-4.8.5.tgz",+ "integrity": "sha512-VgKKiJqldSvidWC1xv2o36P6S2y0vOfrQkdfesmhoj5rDlAVV4qabhYmeuFKBAlomd7EZIfiK0VaMWi4gQf8qw==","license": "MIT","dependencies": {"@aws-sdk/client-s3": "3.996.0","@aws-sdk/lib-storage": "3.996.0","@aws-sdk/s3-request-presigner": "3.996.0",- "@tagspaces/tagspaces-common": "^4.8.3",+ "@tagspaces/tagspaces-common": "^4.8.5","crypto-js": "4.2.0","picomatch": "^3.0.1","uuid": "^11.1.0"@@ -18594,12 +18594,12 @@}},"node_modules/@tagspaces/tagspaces-common-cordova": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-cordova/-/tagspaces-common-cordova-4.8.3.tgz",- "integrity": "sha512-V7eIE4gT7h9/ylWCQymNVfzF+k3q9Wz9qzPyaWpOoh+J1ei6qxY//uAFUC8SGT+udMI0a4j3m4cH8msEULGL9w==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-cordova/-/tagspaces-common-cordova-4.8.5.tgz",+ "integrity": "sha512-KfuJBgZVRrxhpPh9kLQpLKZH7+ttQezNZmruIyTAzc7fcMblbJsDXJn6tJEaBogwzevw+2FRw0MB8anvTdBdDw==","license": "MIT","dependencies": {- "@tagspaces/tagspaces-common": "^4.8.3"+ "@tagspaces/tagspaces-common": "^4.8.5"}},"node_modules/@tagspaces/tagspaces-common/node_modules/dompurify": {@@ -18637,21 +18637,21 @@}},"node_modules/@tagspaces/tagspaces-indexer": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.8.3.tgz",- "integrity": "sha512-OE5gkDuEtAIVGiGZLO5CocR1VRHVVjWdOCV4/htoSpI2chfeO2QHxPKusY/xzxNI4dMDXshjTGb1LYv9GWMIOQ==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.8.5.tgz",+ "integrity": "sha512-ufE2cEBYpksQyy3PNdAvZzkuFDxBcWVL+JlNDrOTn3RWfWlIRmzo+ppOLnEie3saCKTToEc35V3OfFg1G4ZEDw==","license": "MIT","dependencies": {- "@tagspaces/tagspaces-common": "^4.8.3"+ "@tagspaces/tagspaces-common": "^4.8.5"}},"node_modules/@tagspaces/tagspaces-search": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-search/-/tagspaces-search-4.8.3.tgz",- "integrity": "sha512-v+Vd1m4qR4YycwZPXdvFM+qRcT57/Tu3rfWecVv4miCPkWFfLbVHMY2dzn/GfYtsZyDr1V+afMJWR1pnOT6c9g==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-search/-/tagspaces-search-4.8.5.tgz",+ "integrity": "sha512-D3fmBsC63FvMooJ5MD68sWF52oRUll7x+e7u9t8dwCreeyWpLExto1/kOcw6fk9oSPs9OG1gdX0oKAeIqJ08IQ==","license": "MIT","dependencies": {- "@tagspaces/tagspaces-common": "^4.8.3",+ "@tagspaces/tagspaces-common": "^4.8.5","fuse.js": "^7.0.0","mgrs": "^2.1.0","open-location-code-typescript": "^1.5.0"diff --git a/package.json b/package.jsonindex 048efb6d4..8e38a2f39 100644--- a/package.json+++ b/package.json@@ -179,11 +179,11 @@"@mui/material": "9.0.1","@mui/x-data-grid": "9.0.4","@mui/x-date-pickers": "9.0.4",- "@tagspaces/tagspaces-common": "4.8.3",- "@tagspaces/tagspaces-common-aws3": "4.8.3",- "@tagspaces/tagspaces-common-cordova": "4.8.3",- "@tagspaces/tagspaces-indexer": "4.8.3",- "@tagspaces/tagspaces-search": "4.8.3",+ "@tagspaces/tagspaces-common": "4.8.5",+ "@tagspaces/tagspaces-common-aws3": "4.8.5",+ "@tagspaces/tagspaces-common-cordova": "4.8.5",+ "@tagspaces/tagspaces-indexer": "4.8.5",+ "@tagspaces/tagspaces-search": "4.8.5","aws-amplify": "4.3.36","coordinate-parser": "1.0.7","crypto-js": "4.2.0",diff --git a/release/app/package-lock.json b/release/app/package-lock.jsonindex a9f45d0b1..1c5e6d2b5 100644--- a/release/app/package-lock.json+++ b/release/app/package-lock.json@@ -11,8 +11,8 @@"license": "AGPL-3.0","dependencies": {"@tagspaces/extensions": "1.0.245",- "@tagspaces/tagspaces-common-node": "4.8.3",- "@tagspaces/tagspaces-ws": "4.8.4",+ "@tagspaces/tagspaces-common-node": "4.8.5",+ "@tagspaces/tagspaces-ws": "4.8.5","wasm-vips": "0.0.17","ws": "8.19.0"},@@ -296,9 +296,9 @@}},"node_modules/@tagspaces/tagspaces-common": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.8.3.tgz",- "integrity": "sha512-Vb7kQ7SCeL5daFLSv44Hy3y0DbgHouwVgqTnrfBl/KRLixtDaBhItKNYz8gdtVPTGkOD4I6ochaEUEAZVTnQbA==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.8.5.tgz",+ "integrity": "sha512-04FDYHJmcNTtkee1ms5zWj8g0Jt+s9CGvlsNwXBfMvrOtIV78eyLxXZk/05STuqJWPMR2rOfoVCos8ny5+WUBA==","license": "MIT","dependencies": {"dompurify": "3.3.1",@@ -309,24 +309,24 @@}},"node_modules/@tagspaces/tagspaces-common-node": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.8.3.tgz",- "integrity": "sha512-Bmy43KlV26Hg566QFXASuJYYg+9U72mmCtbH+VjK261jOtuigwZN+dRJMhT9rFz48L6/0RnN6qt75u5DXciijg==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.8.5.tgz",+ "integrity": "sha512-gvVTa+y9oiDrECgiPNHwMwX2bD722kAbNSmrad1XQ1IkB18+pMOK2NeQFLKsdC3RWpfbvTuN0wC4nF5A4IaYSg==","license": "MIT","dependencies": {- "@tagspaces/tagspaces-common": "^4.8.3",+ "@tagspaces/tagspaces-common": "^4.8.5","adm-zip": "0.5.16","fs-extra": "11.3.3","klaw": "4.1.0"}},"node_modules/@tagspaces/tagspaces-indexer": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.8.3.tgz",- "integrity": "sha512-OE5gkDuEtAIVGiGZLO5CocR1VRHVVjWdOCV4/htoSpI2chfeO2QHxPKusY/xzxNI4dMDXshjTGb1LYv9GWMIOQ==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.8.5.tgz",+ "integrity": "sha512-ufE2cEBYpksQyy3PNdAvZzkuFDxBcWVL+JlNDrOTn3RWfWlIRmzo+ppOLnEie3saCKTToEc35V3OfFg1G4ZEDw==","license": "MIT","dependencies": {- "@tagspaces/tagspaces-common": "^4.8.3"+ "@tagspaces/tagspaces-common": "^4.8.5"}},"node_modules/@tagspaces/tagspaces-pdf-extraction": {@@ -339,36 +339,36 @@}},"node_modules/@tagspaces/tagspaces-thumbgen-image": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-thumbgen-image/-/tagspaces-thumbgen-image-4.8.3.tgz",- "integrity": "sha512-VlBBrxVyic/rbDiGTmGFDY4eLxIMvFvOPHmA3bdPi7P19SDcOzvcl4pssEL7WZ6pvK1wj+luc16RiIXQRFJd6w==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-thumbgen-image/-/tagspaces-thumbgen-image-4.8.5.tgz",+ "integrity": "sha512-L7KWwuypgJInZIKpUcVLgGcoRkQlM3kX3YF7oVDKjql2dJkDnEtShimXbtJE2XGvL1LbUoirHE1vn0t+7EW/ZQ==","license": "MIT","dependencies": {- "@tagspaces/tagspaces-common": "^4.8.3",+ "@tagspaces/tagspaces-common": "^4.8.5","wasm-vips": "0.0.17"}},"node_modules/@tagspaces/tagspaces-workers": {- "version": "4.8.4",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.8.4.tgz",- "integrity": "sha512-bSrd8EBlwyVW7jLBVl7D2BBGRUAS1P0FnGFBPLwXtynl2DGjzYe/a6YqdLnxBC0cm20D7JD+dxDJeQItjctNeA==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.8.5.tgz",+ "integrity": "sha512-wAhfp+nUd7pCG+ztoJBt/GY7cFr2PimN1pJkczxd+S/x7qZ++uFeD0pDcIvqku6UXkeEZ96+LVmZnfK0T4HtDw==","license": "MIT","dependencies": {- "@tagspaces/tagspaces-common": "^4.8.3",- "@tagspaces/tagspaces-common-node": "^4.8.3",+ "@tagspaces/tagspaces-common": "^4.8.5",+ "@tagspaces/tagspaces-common-node": "^4.8.5","@tagspaces/tagspaces-pdf-extraction": "^4.8.4",- "@tagspaces/tagspaces-thumbgen-image": "^4.8.3"+ "@tagspaces/tagspaces-thumbgen-image": "^4.8.5"}},"node_modules/@tagspaces/tagspaces-ws": {- "version": "4.8.4",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.8.4.tgz",- "integrity": "sha512-ey+kvb4KiafaS31P7b1OEALqmPfglXHp64bPydeBlB8y1QP3/H/S7eOwoA+efPwdxosZpGl/NT7dT78CO+nvaA==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.8.5.tgz",+ "integrity": "sha512-D8uNr5FQ/zC+22c/5e8lMJTdPsv6vvL8aiiOCP3k/VOFbwHAKfinqLWlMj35zgSPv5eCN8AHbdOIaFnYtctzaw==","license": "MIT","dependencies": {- "@tagspaces/tagspaces-indexer": "^4.8.3",+ "@tagspaces/tagspaces-indexer": "^4.8.5","@tagspaces/tagspaces-pdf-extraction": "^4.8.4",- "@tagspaces/tagspaces-workers": "^4.8.4",+ "@tagspaces/tagspaces-workers": "^4.8.5","find-free-ports": "3.1.1","jsonwebtoken": "9.0.3","wasm-vips": "0.0.17",@@ -886,9 +886,9 @@"integrity": "sha512-WLrdekmc9PsCc813SWI43mcS0luaVTz04cvtB0RoDZpVgQ9PDlP5sMZC62l+ZG/yIDOwGzNO60/RAERRp4JB0w=="},"@tagspaces/tagspaces-common": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.8.3.tgz",- "integrity": "sha512-Vb7kQ7SCeL5daFLSv44Hy3y0DbgHouwVgqTnrfBl/KRLixtDaBhItKNYz8gdtVPTGkOD4I6ochaEUEAZVTnQbA==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common/-/tagspaces-common-4.8.5.tgz",+ "integrity": "sha512-04FDYHJmcNTtkee1ms5zWj8g0Jt+s9CGvlsNwXBfMvrOtIV78eyLxXZk/05STuqJWPMR2rOfoVCos8ny5+WUBA==","requires": {"dompurify": "3.3.1","jszip": "3.10.1",@@ -898,22 +898,22 @@}},"@tagspaces/tagspaces-common-node": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.8.3.tgz",- "integrity": "sha512-Bmy43KlV26Hg566QFXASuJYYg+9U72mmCtbH+VjK261jOtuigwZN+dRJMhT9rFz48L6/0RnN6qt75u5DXciijg==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-common-node/-/tagspaces-common-node-4.8.5.tgz",+ "integrity": "sha512-gvVTa+y9oiDrECgiPNHwMwX2bD722kAbNSmrad1XQ1IkB18+pMOK2NeQFLKsdC3RWpfbvTuN0wC4nF5A4IaYSg==","requires": {- "@tagspaces/tagspaces-common": "^4.8.3",+ "@tagspaces/tagspaces-common": "^4.8.5","adm-zip": "0.5.16","fs-extra": "11.3.3","klaw": "4.1.0"}},"@tagspaces/tagspaces-indexer": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.8.3.tgz",- "integrity": "sha512-OE5gkDuEtAIVGiGZLO5CocR1VRHVVjWdOCV4/htoSpI2chfeO2QHxPKusY/xzxNI4dMDXshjTGb1LYv9GWMIOQ==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-indexer/-/tagspaces-indexer-4.8.5.tgz",+ "integrity": "sha512-ufE2cEBYpksQyy3PNdAvZzkuFDxBcWVL+JlNDrOTn3RWfWlIRmzo+ppOLnEie3saCKTToEc35V3OfFg1G4ZEDw==","requires": {- "@tagspaces/tagspaces-common": "^4.8.3"+ "@tagspaces/tagspaces-common": "^4.8.5"}},"@tagspaces/tagspaces-pdf-extraction": {@@ -925,33 +925,33 @@}},"@tagspaces/tagspaces-thumbgen-image": {- "version": "4.8.3",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-thumbgen-image/-/tagspaces-thumbgen-image-4.8.3.tgz",- "integrity": "sha512-VlBBrxVyic/rbDiGTmGFDY4eLxIMvFvOPHmA3bdPi7P19SDcOzvcl4pssEL7WZ6pvK1wj+luc16RiIXQRFJd6w==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-thumbgen-image/-/tagspaces-thumbgen-image-4.8.5.tgz",+ "integrity": "sha512-L7KWwuypgJInZIKpUcVLgGcoRkQlM3kX3YF7oVDKjql2dJkDnEtShimXbtJE2XGvL1LbUoirHE1vn0t+7EW/ZQ==","requires": {- "@tagspaces/tagspaces-common": "^4.8.3",+ "@tagspaces/tagspaces-common": "^4.8.5","wasm-vips": "0.0.17"}},"@tagspaces/tagspaces-workers": {- "version": "4.8.4",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.8.4.tgz",- "integrity": "sha512-bSrd8EBlwyVW7jLBVl7D2BBGRUAS1P0FnGFBPLwXtynl2DGjzYe/a6YqdLnxBC0cm20D7JD+dxDJeQItjctNeA==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-workers/-/tagspaces-workers-4.8.5.tgz",+ "integrity": "sha512-wAhfp+nUd7pCG+ztoJBt/GY7cFr2PimN1pJkczxd+S/x7qZ++uFeD0pDcIvqku6UXkeEZ96+LVmZnfK0T4HtDw==","requires": {- "@tagspaces/tagspaces-common": "^4.8.3",- "@tagspaces/tagspaces-common-node": "^4.8.3",+ "@tagspaces/tagspaces-common": "^4.8.5",+ "@tagspaces/tagspaces-common-node": "^4.8.5","@tagspaces/tagspaces-pdf-extraction": "^4.8.4",- "@tagspaces/tagspaces-thumbgen-image": "^4.8.3"+ "@tagspaces/tagspaces-thumbgen-image": "^4.8.5"}},"@tagspaces/tagspaces-ws": {- "version": "4.8.4",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.8.4.tgz",- "integrity": "sha512-ey+kvb4KiafaS31P7b1OEALqmPfglXHp64bPydeBlB8y1QP3/H/S7eOwoA+efPwdxosZpGl/NT7dT78CO+nvaA==",+ "version": "4.8.5",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-ws/-/tagspaces-ws-4.8.5.tgz",+ "integrity": "sha512-D8uNr5FQ/zC+22c/5e8lMJTdPsv6vvL8aiiOCP3k/VOFbwHAKfinqLWlMj35zgSPv5eCN8AHbdOIaFnYtctzaw==","requires": {- "@tagspaces/tagspaces-indexer": "^4.8.3",+ "@tagspaces/tagspaces-indexer": "^4.8.5","@tagspaces/tagspaces-pdf-extraction": "^4.8.4",- "@tagspaces/tagspaces-workers": "^4.8.4",+ "@tagspaces/tagspaces-workers": "^4.8.5","find-free-ports": "3.1.1","jsonwebtoken": "9.0.3","wasm-vips": "0.0.17",diff --git a/release/app/package.json b/release/app/package.jsonindex 9815d1f2d..222cdcc25 100644--- a/release/app/package.json+++ b/release/app/package.json@@ -18,8 +18,8 @@},"dependencies": {"@tagspaces/extensions": "1.0.245",- "@tagspaces/tagspaces-common-node": "4.8.3",- "@tagspaces/tagspaces-ws": "4.8.4",+ "@tagspaces/tagspaces-common-node": "4.8.5",+ "@tagspaces/tagspaces-ws": "4.8.5","wasm-vips": "0.0.17","ws": "8.19.0"},diff --git a/src/main/chokidarWatcher.ts b/src/main/chokidarWatcher.tsindex 1bd21f0b7..200e0052f 100644--- a/src/main/chokidarWatcher.ts+++ b/src/main/chokidarWatcher.ts@@ -42,6 +42,7 @@ export function watchFolder(// /(^|[\/\\])\../.test(path) || path.includes('.ts'), // ignoring .dotfiles // ignoring .ts folder// (stats && stats.isDirectory()), // ignoring directoriesignoreInitial: true,+ followSymlinks: false,depth,});diff --git a/src/renderer/components/EntryIcon.tsx b/src/renderer/components/EntryIcon.tsxindex 18061650e..c2033948f 100644--- a/src/renderer/components/EntryIcon.tsx+++ b/src/renderer/components/EntryIcon.tsx@@ -22,6 +22,8 @@ import React, { useMemo } from 'react';interface Props {isFile: boolean;fileExtension?: string;+ isSymbolicLink?: boolean;+ isBrokenSymlink?: boolean;}const ICONS = {@@ -81,7 +83,12 @@ function getIcon(isFile: boolean, fileExtension: string): React.ReactNode {return ICONS.genericFile;}-function EntryIcon({ isFile, fileExtension = '' }: Props) {+function EntryIcon({+ isFile,+ fileExtension = '',+ isSymbolicLink = false,+ isBrokenSymlink = false,+}: Props) {// Memoize icon selection for performanceconst iconSVGPath = useMemo(() => getIcon(isFile, fileExtension),@@ -96,6 +103,25 @@ function EntryIcon({ isFile, fileExtension = '' }: Props) {fill="#bbbbbb22">{iconSVGPath}+ {isSymbolicLink && !isBrokenSymlink && (+ <path+ d="M 10 12 L 14 12 M 12 10 L 14 12 L 12 14"+ stroke="#1976d2"+ strokeWidth="2"+ strokeLinecap="round"+ strokeLinejoin="round"+ fill="none"+ />+ )}+ {isBrokenSymlink && (+ <path+ d="M 10 10 L 14 14 M 14 10 L 10 14"+ stroke="#d32f2f"+ strokeWidth="2"+ strokeLinecap="round"+ fill="none"+ />+ )}</svg>);}diff --git a/src/renderer/components/dialogs/components/SettingsGeneral.tsx b/src/renderer/components/dialogs/components/SettingsGeneral.tsxindex 691e58b37..b1848ea69 100644--- a/src/renderer/components/dialogs/components/SettingsGeneral.tsx+++ b/src/renderer/components/dialogs/components/SettingsGeneral.tsx@@ -733,6 +733,29 @@ function SettingsGeneral() {</ListItem>),},+ {+ label: t('core:showSymbolicLinks'),+ jsx: (+ <ListItem>+ <ListItemText+ primary={+ <Typography>+ {t('core:showSymbolicLinks')}+ <InfoIcon tooltip={t('core:showSymbolicLinksInfo')} />+ </Typography>+ }+ />+ <TsSwitch+ data-tid="settingsSetShowSymbolicLinks"+ onClick={() => {+ dispatch(SettingsActions.toggleShowSymbolicLinks());+ openCurrentDirectory();+ }}+ checked={settings.showSymbolicLinks !== false}+ />+ </ListItem>+ ),+ },{label: t('core:maxSearchResultChoose'),jsx: (diff --git a/src/renderer/hooks/DirectoryContentContextProvider.tsx b/src/renderer/hooks/DirectoryContentContextProvider.tsxindex 3d8e10a3e..f616795a6 100644--- a/src/renderer/hooks/DirectoryContentContextProvider.tsx+++ b/src/renderer/hooks/DirectoryContentContextProvider.tsx@@ -35,6 +35,7 @@ import {import {actions as SettingsActions,getDefaultPerspective,+ getShowSymbolicLinks,getShowUnixHiddenEntries,getTagDelimiter,} from '-/reducers/settings';@@ -250,6 +251,7 @@ export const DirectoryContentContextProvider = ({const currentLocationPath = useRef<string>('');//const useGenerateThumbnails = useSelector(getUseGenerateThumbnails);const showUnixHiddenEntries = useSelector(getShowUnixHiddenEntries);+ const showSymbolicLinks = useSelector(getShowSymbolicLinks);const defaultPerspective = useSelector(getDefaultPerspective);const tagDelimiter: string = useSelector(getTagDelimiter);const isOnline = useSelector(getIsOnline);@@ -1007,7 +1009,13 @@ export const DirectoryContentContextProvider = ({});}},- [currentLocation, signal, selectedEntries, showUnixHiddenEntries],+ [+ currentLocation,+ signal,+ selectedEntries,+ showUnixHiddenEntries,+ showSymbolicLinks,+ ],);const loadDirectoryContentInt = useCallback(@@ -1073,7 +1081,7 @@ export const DirectoryContentContextProvider = ({return [];});},- [signal, showUnixHiddenEntries],+ [signal, showUnixHiddenEntries, showSymbolicLinks],);function clearDirectoryContent() {@@ -1219,6 +1227,10 @@ export const DirectoryContentContextProvider = ({return;}+ if (!showSymbolicLinks && entry.isSymbolicLink) {+ return;+ }+if (!showDirs && !entry.isFile) {return;}diff --git a/src/renderer/locales/en/core.json b/src/renderer/locales/en/core.jsonindex 1885d2f58..6f1f9b8be 100644--- a/src/renderer/locales/en/core.json+++ b/src/renderer/locales/en/core.json@@ -132,6 +132,8 @@"openInWindow": "Open in new window","openInApp": "Open in {{appName}}","showUnixHiddenFiles": "Show files/folders with a dot(.) in front of the name (e.g. Unix, Linux, OS X hidden files)",+ "showSymbolicLinks": "Show symbolic links",+ "showSymbolicLinksInfo": "Display symlinks (symbolic/shortcut links) in folder listings, disable to hide them.","checkForNewVersionOnStartup": "Check for new version on startup","reorderTags": "Enable changing the tag order with drag and drop","prefixTagContainer": "Prefix for the tag container",@@ -785,6 +787,8 @@"stopRecording": "Stop and save recording","confirmDialogClosing": "Do you want to close this dialog?","clickToSelect": "Click to select",+ "symbolicLinkTo": "Symbolic link → {{- target}}",+ "brokenSymbolicLink": "Broken symbolic link","newVersionAvailable": "New version available","versionAvailable": "Version {{version}} available","urlNotSupported": "URL not supported",diff --git a/src/renderer/perspectives/grid/components/GridCell.tsx b/src/renderer/perspectives/grid/components/GridCell.tsxindex 670a470bd..7c7970be0 100644--- a/src/renderer/perspectives/grid/components/GridCell.tsx+++ b/src/renderer/perspectives/grid/components/GridCell.tsx@@ -427,7 +427,26 @@ function GridCell(props: Props) {function generateExtension() {return (- <TsTooltip title={i18n.t('clickToSelect') + ': ' + fsEntry.name}>+ <TsTooltip+ title={+ <>+ {fsEntry.isBrokenSymlink ? (+ <>+ {i18n.t('core:brokenSymbolicLink')}+ <br />+ </>+ ) : fsEntry.isSymbolicLink ? (+ <>+ {i18n.t('core:symbolicLinkTo', {+ target: fsEntry.symlinkTargetPath || '?',+ })}+ <br />+ </>+ ) : null}+ {i18n.t('clickToSelect')}: {fsEntry.name}+ </>+ }+ ><FileExtBadgesx={{backgroundColor: fileSystemEntryColor,@@ -534,6 +553,8 @@ function GridCell(props: Props) {<EntryIconisFile={fsEntry.isFile}fileExtension={fsEntry.extension}+ isSymbolicLink={fsEntry.isSymbolicLink}+ isBrokenSymlink={fsEntry.isBrokenSymlink}/></Box>)}diff --git a/src/renderer/perspectives/list/components/RowCell.tsx b/src/renderer/perspectives/list/components/RowCell.tsxindex 783c74211..eca037383 100644--- a/src/renderer/perspectives/list/components/RowCell.tsx+++ b/src/renderer/perspectives/list/components/RowCell.tsx@@ -355,7 +355,26 @@ function RowCell(props: Props) {alignSelf: 'center',}}>- <TsTooltip title={i18n.t('clickToSelect') + ': ' + fsEntry.name}>+ <TsTooltip+ title={+ <>+ {fsEntry.isBrokenSymlink ? (+ <>+ {i18n.t('core:brokenSymbolicLink')}+ <br />+ </>+ ) : fsEntry.isSymbolicLink ? (+ <>+ {i18n.t('core:symbolicLinkTo', {+ target: fsEntry.symlinkTargetPath || '?',+ })}+ <br />+ </>+ ) : null}+ {i18n.t('clickToSelect')}: {fsEntry.name}+ </>+ }+ ><FileExtBadgesx={{backgroundColor: fileSystemEntryColor,diff --git a/src/renderer/reducers/settings-default.ts b/src/renderer/reducers/settings-default.tsindex 0ef178465..b0b8ac2f2 100644--- a/src/renderer/reducers/settings-default.ts+++ b/src/renderer/reducers/settings-default.ts@@ -76,6 +76,7 @@ export default {newHTMLFileContent:'<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body></body></html>',showUnixHiddenEntries: false,+ showSymbolicLinks: true,entryContainerTab: 0,checkForUpdates,reorderTags: false,diff --git a/src/renderer/reducers/settings.ts b/src/renderer/reducers/settings.tsindex 8f624c64b..d7efa041b 100644--- a/src/renderer/reducers/settings.ts+++ b/src/renderer/reducers/settings.ts@@ -38,6 +38,7 @@ export const types = {UPGRADE_SETTINGS: 'SETTINGS/UPGRADE_SETTINGS',SET_LANGUAGE: 'SETTINGS/SET_LANGUAGE',TOGGLE_SHOWUNIXHIDDENENTRIES: 'SETTINGS/TOGGLE_SHOWUNIXHIDDENENTRIES',+ TOGGLE_SHOWSYMBOLICLINKS: 'SETTINGS/TOGGLE_SHOWSYMBOLICLINKS',SET_ENTRY_CONTAINER_TAB: 'SETTINGS/SET_ENTRY_CONTAINER_TAB',SET_DESKTOPMODE: 'SETTINGS/SET_DESKTOPMODE',SET_USEONLYTAGSFROMTAGLIBRARY: 'SETTINGS/SET_USEONLYTAGSFROMTAGLIBRARY',@@ -184,6 +185,9 @@ export default (state: any = defaultSettings, action: any) => {case types.TOGGLE_SHOWUNIXHIDDENENTRIES: {return { ...state, showUnixHiddenEntries: !state.showUnixHiddenEntries };}+ case types.TOGGLE_SHOWSYMBOLICLINKS: {+ return { ...state, showSymbolicLinks: !state.showSymbolicLinks };+ }case types.SET_ENTRY_CONTAINER_TAB: {return { ...state, entryContainerTab: action.entryContainerTab };}@@ -736,6 +740,9 @@ export const actions = {toggleShowUnixHiddenEntries: () => ({type: types.TOGGLE_SHOWUNIXHIDDENENTRIES,}),+ toggleShowSymbolicLinks: () => ({+ type: types.TOGGLE_SHOWSYMBOLICLINKS,+ }),setEntryContainerTab: (tabName: (typeof TabNames)[keyof typeof TabNames],) => ({@@ -1105,6 +1112,8 @@ export const getLastPublishedVersion = (state: any) =>state.settings.lastPublishedVersion;export const getShowUnixHiddenEntries = (state: any) =>state.settings.showUnixHiddenEntries;+export const getShowSymbolicLinks = (state: any) =>+ state.settings.showSymbolicLinks !== false;export const getEntryContainerTab = (state: any) =>state.settings.entryContainerTab;export const getUseDefaultLocation = (state: any) =>diff --git a/src/renderer/tagspaces.namespace.d.ts b/src/renderer/tagspaces.namespace.d.tsindex f1263ec2d..e2f272d9e 100644--- a/src/renderer/tagspaces.namespace.d.ts+++ b/src/renderer/tagspaces.namespace.d.ts@@ -194,6 +194,9 @@ export namespace TS {name: string;isFile: boolean;isNewFile?: boolean;+ isSymbolicLink?: boolean;+ isBrokenSymlink?: boolean;+ symlinkTargetPath?: string;locationID?: string;//isAutoSaveEnabled?: boolean; // common with OpenedEntryextension?: string;