Skip to content

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

TSN898 - Fix tagging dropdown (#1705)

Stanimir2bd29be41769
diff --git a/app/components/EntryProperties.tsx b/app/components/EntryProperties.tsx
index b8b8db859..f266d8b2d 100644
--- a/app/components/EntryProperties.tsx
+++ b/app/components/EntryProperties.tsx
@@ -481,11 +481,23 @@ function EntryProperties(props: Props) {
PlatformIO.getDirSeparator()
);
}
+ /**
+ * normalize path for URL is always '/'
+ * TODO move this in common module
+ */
+ function normalizeUrl(url: string) {
+ if (PlatformIO.getDirSeparator() !== '/') {
+ if (url) {
+ return url.replaceAll(PlatformIO.getDirSeparator(), '/');
+ }
+ }
+ return url;
+ }
let url;
if (PlatformIO.haveObjectStoreSupport() || PlatformIO.haveWebDavSupport()) {
url = PlatformIO.getURLforPath(thumbPath);
} else {
- url = thumbPath + '?' + new Date().getTime();
+ url = normalizeUrl(thumbPath) + '?' + new Date().getTime();
}
const thumbPathUrl = thumbPath ? 'url("' + url + '")' : '';
diff --git a/app/package.json b/app/package.json
index 0683e46aa..f893c0653 100644
--- a/app/package.json
+++ b/app/package.json
@@ -16,7 +16,7 @@
"@tagspaces/extensions": "1.0.29"
},
"nodeDependencies": {
- "@tagspaces/tagspaces-ws": "2.0.10",
+ "@tagspaces/tagspaces-ws": "2.0.11",
"@tagspaces/extensions": "1.0.29",
"sharp": "^0.30.7"
}
diff --git a/package.json b/package.json
index b39d4dc59..7467dc4f2 100644
--- a/package.json
+++ b/package.json
@@ -154,7 +154,7 @@
"@mui/styles": "^5.9.2",
"@mui/icons-material": "^5.8.4",
"@mui/lab": "^5.0.0-alpha.92",
- "@tagspaces/tagspaces-platforms": "2.0.9",
+ "@tagspaces/tagspaces-platforms": "2.0.11",
"aws-amplify": "^4.3.8",
"aws-sdk": "^2.1036.0",
"babel-polyfill": "^6.26.0",