TagSpaces is an offline, open source, document manager with tagging support
fix Search with scope folder do not work (#1923)
Stanimir2e7e2a5cef55
diff --git a/app/AppConfig.ts b/app/AppConfig.tsindex 26b02ff09..7f6c5bcb4 100644--- a/app/AppConfig.ts+++ b/app/AppConfig.ts@@ -28,6 +28,6 @@ AppConfig.editableFiles = ['sql'];AppConfig.autoSaveInterval = 40000;-AppConfig.maxLoops = 5;+AppConfig.maxLoops = 2;export default AppConfig;diff --git a/app/package.json b/app/package.jsonindex 58e95feeb..bf03f807d 100644--- a/app/package.json+++ b/app/package.json@@ -16,7 +16,7 @@"@tagspaces/extensions": "1.0.84"},"nodeDependencies": {- "@tagspaces/tagspaces-ws": "2.1.36",+ "@tagspaces/tagspaces-ws": "2.1.37","@tagspaces/extensions": "1.0.84","sharp": "0.31.3"}diff --git a/app/services/search.ts b/app/services/search.tsindex bdcccb8e2..baeb7b00e 100644--- a/app/services/search.ts+++ b/app/services/search.ts@@ -20,6 +20,7 @@import Fuse from 'fuse.js';import jmespath from '@gorillastack/jmespath';import i18n from 'i18next';+import { isPathStartsWith } from '@tagspaces/tagspaces-common/paths';import { parseGeoLocation } from '-/utils/geo';import { extractTimePeriod } from '-/utils/dates';import { Pro } from '../pro';@@ -366,7 +367,7 @@ export default class Search {// Limiting the search to current folder only (with sub-folders)if (searchQuery.searchBoxing === 'folder') {results = results.filter(entry =>- entry.path.startsWith(searchQuery.currentDirectory)+ isPathStartsWith(entry.path, searchQuery.currentDirectory));}diff --git a/package-lock.json b/package-lock.jsonindex 45c85bfbf..0d13eda5f 100644--- a/package-lock.json+++ b/package-lock.json@@ -21,7 +21,7 @@"@mui/styles": "5.10.15","@mui/x-date-pickers": "^5.0.8","@tagspaces/tagspaces-md": "2.1.6",- "@tagspaces/tagspaces-platforms": "2.1.36",+ "@tagspaces/tagspaces-platforms": "2.1.37","aws-amplify": "^4.3.8","aws-sdk": "^2.1036.0","babel-polyfill": "^6.26.0",@@ -12309,9 +12309,9 @@}},"node_modules/@tagspaces/tagspaces-platforms": {- "version": "2.1.36",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.1.36.tgz",- "integrity": "sha512-MSkpEv51Jiw/ALGeMEORrtgq2ftPDs3y9ELxBLw6+SbMJ4HpVjir5eN2NjN4HCQRcPOt4QFuFpNFmzdM7dLEyw==",+ "version": "2.1.37",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.1.37.tgz",+ "integrity": "sha512-ecwLArADyp9+GDf2hWjXtxE2A8oYLG+Cn7JZL0rpDpJ+qH93+Rf4PqxydHYcOkjEbANhM5v7Lg9GQ3x/IlGbdg==","hasInstallScript": true},"node_modules/@testim/chrome-version": {@@ -42002,6 +42002,7 @@"version": "2.4.3","resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz","integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",+ "peer": true,"dependencies": {"graceful-fs": "^4.1.11","imurmurhash": "^0.1.4",@@ -51894,9 +51895,9 @@}},"@tagspaces/tagspaces-platforms": {- "version": "2.1.36",- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.1.36.tgz",- "integrity": "sha512-MSkpEv51Jiw/ALGeMEORrtgq2ftPDs3y9ELxBLw6+SbMJ4HpVjir5eN2NjN4HCQRcPOt4QFuFpNFmzdM7dLEyw=="+ "version": "2.1.37",+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.1.37.tgz",+ "integrity": "sha512-ecwLArADyp9+GDf2hWjXtxE2A8oYLG+Cn7JZL0rpDpJ+qH93+Rf4PqxydHYcOkjEbANhM5v7Lg9GQ3x/IlGbdg=="},"@testim/chrome-version": {"version": "1.1.3",@@ -74658,6 +74659,7 @@"version": "2.4.3","resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz","integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==",+ "peer": true,"requires": {"graceful-fs": "^4.1.11","imurmurhash": "^0.1.4",diff --git a/package.json b/package.jsonindex dcc921015..6f94d61fe 100644--- a/package.json+++ b/package.json@@ -150,7 +150,7 @@"@mui/styles": "5.10.15","@mui/x-date-pickers": "^5.0.8","@tagspaces/tagspaces-md": "2.1.6",- "@tagspaces/tagspaces-platforms": "2.1.36",+ "@tagspaces/tagspaces-platforms": "2.1.37","aws-amplify": "^4.3.8","aws-sdk": "^2.1036.0","babel-polyfill": "^6.26.0",