Skip to content

Commit

Permalink
fix(explorer): support home sign
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed Oct 11, 2024
1 parent 9f844fe commit 5312f50
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions addons/explorer/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ export default () => {
})

commas.ipcMain.handle('access-directory', async (event, directory) => {
const dir = commas.helper.resolveHome(directory)
try {
await fs.promises.access(directory)
return directory
await fs.promises.access(dir)
return dir
} catch {
// ignore
}
Expand Down

0 comments on commit 5312f50

Please sign in to comment.