Skip to content

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

fix percent in folder name issue

sytolkd418c8b680d5
diff --git a/app/components/EntryContainer.tsx b/app/components/EntryContainer.tsx
index c07d1213e..b666f1f16 100644
--- a/app/components/EntryContainer.tsx
+++ b/app/components/EntryContainer.tsx
@@ -1388,7 +1388,7 @@ function EntryContainer(props: Props) {
: i18n.t('core:deleteDirectoryContentConfirm', {
dirPath: openedFile.path
? extractDirectoryName(
- decodeURIComponent(openedFile.path),
+ openedFile.path,
PlatformIO.getDirSeparator()
)
: ''
diff --git a/app/package.json b/app/package.json
index f6e799ddc..2b9b727fe 100644
--- a/app/package.json
+++ b/app/package.json
@@ -16,7 +16,7 @@
"@tagspaces/extensions": "1.0.35"
},
"nodeDependencies": {
- "@tagspaces/tagspaces-ws": "2.0.42",
+ "@tagspaces/tagspaces-ws": "2.0.43",
"@tagspaces/extensions": "1.0.35",
"sharp": "^0.30.7"
}
diff --git a/app/perspectives/grid-perspective/components/GridPagination.tsx b/app/perspectives/grid-perspective/components/GridPagination.tsx
index 2a792aa2f..95c2bce7a 100644
--- a/app/perspectives/grid-perspective/components/GridPagination.tsx
+++ b/app/perspectives/grid-perspective/components/GridPagination.tsx
@@ -370,7 +370,7 @@ function GridPagination(props: Props) {
};
const folderName = extractDirectoryName(
- decodeURIComponent(props.currentDirectoryPath),
+ props.currentDirectoryPath,
PlatformIO.getDirSeparator()
);
diff --git a/app/reducers/io-actions.ts b/app/reducers/io-actions.ts
index 10adefde7..4b5de45a5 100644
--- a/app/reducers/io-actions.ts
+++ b/app/reducers/io-actions.ts
@@ -219,10 +219,12 @@ const actions = {
async function setupReader(inx) {
const file = files[inx];
const reader = new FileReader();
+ let fileName = file.name;
+ try {
+ fileName = decodeURIComponent(file.name);
+ } catch (ex) {}
let filePath =
- normalizePath(targetPath) +
- PlatformIO.getDirSeparator() +
- decodeURIComponent(file.name);
+ normalizePath(targetPath) + PlatformIO.getDirSeparator() + fileName;
if (
PlatformIO.haveObjectStoreSupport() &&
(filePath.startsWith('\\') || filePath.startsWith('/'))
diff --git a/app/services/platform-facade.ts b/app/services/platform-facade.ts
index e9f9c68b6..ec48f03ca 100644
--- a/app/services/platform-facade.ts
+++ b/app/services/platform-facade.ts
@@ -334,8 +334,13 @@ export default class PlatformFacade {
static loadTextFilePromise = (
filePath: string,
isPreview?: boolean
- ): Promise<any> =>
- platformLoadTextFilePromise(decodeURIComponent(filePath), isPreview);
+ ): Promise<any> => {
+ let path = filePath;
+ try {
+ path = decodeURIComponent(filePath);
+ } catch (ex) {}
+ return platformLoadTextFilePromise(path, isPreview);
+ };
static getFileContentPromise = (
filePath: string,
diff --git a/package-lock.json b/package-lock.json
index 37fdccfd6..e562df298 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -20,7 +20,7 @@
"@mui/material": "^5.9.2",
"@mui/styles": "^5.9.2",
"@tagspaces/tagspaces-md": "2.0.34",
- "@tagspaces/tagspaces-platforms": "2.0.42",
+ "@tagspaces/tagspaces-platforms": "2.0.43",
"aws-amplify": "^4.3.8",
"aws-sdk": "^2.1036.0",
"babel-polyfill": "^6.26.0",
@@ -13658,9 +13658,9 @@
}
},
"node_modules/@tagspaces/tagspaces-platforms": {
- "version": "2.0.42",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.0.42.tgz",
- "integrity": "sha512-okoovszrIjzFSEWLW2K3haB0x4aYzZK/cNULCAAcC7XHntzgHjI0k8QexJi0wTrvncNJBzTuvWtSCbeMnAAlJg==",
+ "version": "2.0.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.0.43.tgz",
+ "integrity": "sha512-kq1UH5vUJ0C55CU+vvtgb9Mnc401m1Yu3ZWIXFC+0oDsGnoYRbdgtCzJ0KUUg/7vhH5mTBiiruEihzfWGXXJwA==",
"hasInstallScript": true
},
"node_modules/@testim/chrome-version": {
@@ -59222,9 +59222,9 @@
}
},
"@tagspaces/tagspaces-platforms": {
- "version": "2.0.42",
- "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.0.42.tgz",
- "integrity": "sha512-okoovszrIjzFSEWLW2K3haB0x4aYzZK/cNULCAAcC7XHntzgHjI0k8QexJi0wTrvncNJBzTuvWtSCbeMnAAlJg=="
+ "version": "2.0.43",
+ "resolved": "https://registry.npmjs.org/@tagspaces/tagspaces-platforms/-/tagspaces-platforms-2.0.43.tgz",
+ "integrity": "sha512-kq1UH5vUJ0C55CU+vvtgb9Mnc401m1Yu3ZWIXFC+0oDsGnoYRbdgtCzJ0KUUg/7vhH5mTBiiruEihzfWGXXJwA=="
},
"@testim/chrome-version": {
"version": "1.1.3",
diff --git a/package.json b/package.json
index 9998e3c45..fa959e10f 100644
--- a/package.json
+++ b/package.json
@@ -157,7 +157,7 @@
"@mui/material": "^5.9.2",
"@mui/styles": "^5.9.2",
"@tagspaces/tagspaces-md": "2.0.34",
- "@tagspaces/tagspaces-platforms": "2.0.42",
+ "@tagspaces/tagspaces-platforms": "2.0.43",
"aws-amplify": "^4.3.8",
"aws-sdk": "^2.1036.0",
"babel-polyfill": "^6.26.0",