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): fix windows userspace loss (#8450)

EYHN67f7a4de9c13
diff --git a/packages/frontend/apps/electron/src/helper/workspace/meta.ts b/packages/frontend/apps/electron/src/helper/workspace/meta.ts
index 79379bd19e..9433be082a 100644
--- a/packages/frontend/apps/electron/src/helper/workspace/meta.ts
+++ b/packages/frontend/apps/electron/src/helper/workspace/meta.ts
@@ -2,6 +2,7 @@ import path from 'node:path';
import fs from 'fs-extra';
+import { isWindows } from '../../shared/utils';
import type { SpaceType } from '../db/types';
import { logger } from '../logger';
import { mainRPC } from '../main-rpc';
@@ -28,7 +29,7 @@ export async function getWorkspaceBasePath(
return path.join(
await getAppDataPath(),
spaceType === 'userspace' ? 'userspaces' : 'workspaces',
- workspaceId
+ isWindows() ? workspaceId.replace(':', '_') : workspaceId
);
}