mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-13 04:28:41 -09:00
Use electron's getPath() API to get the user's app data directory (#2948)
Docs: https://github.com/electron/electron/blob/master/docs/api/app.md#appgetpathname Closes: https://github.com/zeit/hyper/pull/1960 Fixes: https://github.com/zeit/hyper/issues/1944
This commit is contained in:
parent
0d4afdf31d
commit
80bb82122a
1 changed files with 2 additions and 2 deletions
|
|
@ -1,12 +1,12 @@
|
|||
// This module exports paths, names, and other metadata that is referenced
|
||||
const {homedir} = require('os');
|
||||
const {app} = require('electron');
|
||||
const {statSync} = require('fs');
|
||||
const {resolve, join} = require('path');
|
||||
const isDev = require('electron-is-dev');
|
||||
|
||||
const cfgFile = '.hyper.js';
|
||||
const defaultCfgFile = 'config-default.js';
|
||||
const homeDir = homedir();
|
||||
const homeDir = app.getPath('userData');
|
||||
|
||||
let cfgPath = join(homeDir, cfgFile);
|
||||
let cfgDir = homeDir;
|
||||
|
|
|
|||
Loading…
Reference in a new issue