mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-27 18:12:54 +03:00
fix(electron): ignore .DS_Store on MacOS (#2203)
This commit is contained in:
parent
12b61d34c3
commit
5a881ec223
@ -8,7 +8,11 @@ import type { AppContext } from '../context';
|
||||
export async function listWorkspaces(context: AppContext) {
|
||||
const basePath = path.join(context.appDataPath, 'workspaces');
|
||||
try {
|
||||
return fs.readdir(basePath);
|
||||
return fs
|
||||
.readdir(basePath, {
|
||||
withFileTypes: true,
|
||||
})
|
||||
.then(dirs => dirs.filter(dir => dir.isDirectory()).map(dir => dir.name));
|
||||
} catch (error) {
|
||||
logger.error('listWorkspaces', error);
|
||||
return [];
|
||||
|
Loading…
Reference in New Issue
Block a user