@@ -3,7 +3,11 @@ import path from 'path';
33import { app , dialog } from 'electron' ;
44import Store from 'electron-store' ;
55
6- const store = new Store ( ) ;
6+ const store = new Store ( {
7+ defaults : {
8+ toolsPath : getDefaultInstallPath ( )
9+ }
10+ } ) ;
711
812const APP_NAME = 'ogs-meshery' ;
913export const EXTRA_RESOURCE_PATH = path . join ( resourceRoot ( ) , 'extra-resources' ) ;
@@ -43,11 +47,10 @@ export async function changeToolsPath() {
4347}
4448
4549export function getToolsPath ( ) {
46- const legacyPath = path . join ( resourceRoot ( ) , 'python' , 'tools' ) ;
47- if ( fs . existsSync ( legacyPath ) ) {
48- return legacyPath ;
49- }
50-
50+ // const legacyPath = path.join(resourceRoot(), 'python', 'tools');
51+ // if (fs.existsSync(legacyPath)) {
52+ // return legacyPath;
53+ // }
5154 const existing = store . get ( 'toolsPath' ) ;
5255 if ( existing ) {
5356 return existing ;
@@ -62,6 +65,7 @@ export function getToolsPath() {
6265export function setInstallPath ( newPath ) {
6366 store . set ( 'toolsPath' , newPath ) ;
6467}
68+
6569export function getRecentProjects ( ) {
6670 const projects = store . get ( 'recentProjects' , [ ] ) ;
6771 const filtered = sortByOpened ( filterRemoved ( projects ) ) ;
0 commit comments