Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

fix: don't crash if OSX's .DS_Store dir exists #2059

Merged
merged 1 commit into from
Oct 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/main/types/workspaces/WorkspaceManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ class WorkspaceManager {
if (!fse.lstatSync(path.join(workspacesDirectory, file)).isDirectory) {
return [];
}
// if an osx user navigates to the workspaces directory osx will put a
// .DS_Store folder there, ignore these.
if (file === ".DS_Store") {
return []
}

let settings = new WorkspaceSettings(
path.join(workspacesDirectory, file),
path.join(workspacesDirectory, file, "chaindata"),
Expand Down