Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix(electron): plugin cannot found (#3418)

Alex Yangd2459a58374e
diff --git a/apps/electron/src/main/protocol.ts b/apps/electron/src/main/protocol.ts
index 2a9df42178..ee2ac5658a 100644
--- a/apps/electron/src/main/protocol.ts
+++ b/apps/electron/src/main/protocol.ts
@@ -15,7 +15,7 @@ protocol.registerSchemesAsPrivileged([
]);
function toAbsolutePath(url: string) {
- let realpath = decodeURIComponent(url);
+ let realpath: string;
const webStaticDir = join(__dirname, '../resources/web-static');
if (url.startsWith('./')) {
// if is a file type, load the file in resources
@@ -25,6 +25,8 @@ function toAbsolutePath(url: string) {
// else, fallback to load the index.html instead
realpath = join(webStaticDir, 'index.html');
}
+ } else {
+ realpath = join(webStaticDir, decodeURIComponent(url));
}
return realpath;
}