renamed dbgate-data to .dbgate #248

This commit is contained in:
Jan Prochazka
2022-05-17 21:05:48 +02:00
parent eeb52b9a41
commit ce4124caef
6 changed files with 28 additions and 15 deletions

View File

@@ -32,15 +32,6 @@ try {
initialConfig = {};
}
// let settingsJson = {};
// try {
// const datadir = path.join(os.homedir(), 'dbgate-data');
// settingsJson = JSON.parse(fs.readFileSync(path.join(datadir, 'settings.json'), { encoding: 'utf-8' }));
// } catch (err) {
// console.log('Error loading settings.json:', err.message);
// settingsJson = {};
// }
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow;
@@ -252,7 +243,7 @@ function fillMissingSettings(value) {
function createWindow() {
let settingsJson = {};
try {
const datadir = path.join(os.homedir(), 'dbgate-data');
const datadir = path.join(os.homedir(), '.dbgate');
settingsJson = fillMissingSettings(
JSON.parse(fs.readFileSync(path.join(datadir, 'settings.json'), { encoding: 'utf-8' }))
);