Skip to content

Commit c3cb1be

Browse files
committed
Fix file write permission issue in Electron app
1 parent 3491f18 commit c3cb1be

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/paths/paths.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ export function getTypeScriptCachePath(): string {
3131
export function getUserDataPath(): string {
3232
const electron = getElectron();
3333

34-
// When running in Electron and app is ready
35-
if (process.env.NODE_ENV !== "development" && electron) {
36-
return electron!.app.getPath("userData");
34+
// When running in Electron
35+
if (electron) {
36+
return electron.app.getPath("userData");
3737
}
3838

39-
// For development or when the Electron app object isn't available
39+
// When the Electron app object isn't available
4040
return path.resolve("./userData");
4141
}
4242

0 commit comments

Comments
 (0)