Skip to content

Commit

Permalink
Find kiidrv just like dfu-util on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
jbondeson committed Jan 10, 2019
1 parent a70e8e2 commit 401bf92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/renderer/state/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import log from 'loglevel';
import { createSharedState } from '../shared-state/index';
import db from '../db';
import { findDfuPath } from '../local-storage/dfu-util';
import { findKiidrvPath } from '../local-storage/kiidrv';

const dev = process.env.NODE_ENV === 'development';

Expand Down Expand Up @@ -59,7 +60,7 @@ export { useSettingsState };
export { getSettingsState as _currentState };

export async function loadFromDb() {
setSettingsState('kiidrv', await db.core.get(DbKey.kiidrvPath));
setSettingsState('kiidrv', (await db.core.get(DbKey.kiidrvPath)) || (await findKiidrvPath()));
setSettingsState('lastDl', await db.core.get(DbKey.lastDl));
setSettingsState('recentDls', (await db.core.get(DbKey.recentDls)) || {});
setSettingsState('lastVersionCheck', (await db.core.get(DbKey.lastVerCheck)) || 0);
Expand Down

0 comments on commit 401bf92

Please sign in to comment.