diff --git a/apps/1test/src/electron/engine.ts b/apps/1test/src/electron/engine.ts index 891602e03b..f632b269ae 100644 --- a/apps/1test/src/electron/engine.ts +++ b/apps/1test/src/electron/engine.ts @@ -22,6 +22,5 @@ ipcMain.handle('engine:activatePlugin', async (event, arg) => { app.on('before-quit', async () => { await appManager.call('fs', 'closeWatch') - console.log('quit') app.quit() }) \ No newline at end of file diff --git a/apps/1test/src/electron/fsPlugin.ts b/apps/1test/src/electron/fsPlugin.ts index 0622cdffd8..af2b13b3c1 100644 --- a/apps/1test/src/electron/fsPlugin.ts +++ b/apps/1test/src/electron/fsPlugin.ts @@ -34,7 +34,7 @@ class FSPluginClient extends PluginClient { watcher: chokidar.FSWatcher constructor() { super() - this.methods = ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'exists', 'watch', 'closeWatch'] + this.methods = ['readdir', 'readFile', 'writeFile', 'mkdir', 'rmdir', 'unlink', 'rename', 'stat', 'exists', 'watch', 'closeWatch', 'currentPath'] createClient(this, profile) this.onload(() => { console.log('fsPluginClient onload') @@ -78,6 +78,10 @@ class FSPluginClient extends PluginClient { return fs.access(path).then(() => true).catch(() => false) } + async currentPath(): Promise { + return process.cwd() + } + async watch(path: string): Promise { console.log('watch', path) if(this.watcher) this.watcher.close() diff --git a/apps/1test/src/index.ts b/apps/1test/src/index.ts index 9ac1262525..b9e66dbf95 100644 --- a/apps/1test/src/index.ts +++ b/apps/1test/src/index.ts @@ -7,9 +7,7 @@ import fixPath from 'fix-path'; declare const MAIN_WINDOW_WEBPACK_ENTRY: string; declare const MAIN_WINDOW_PRELOAD_WEBPACK_ENTRY: string; -console.log(process.env.PATH); fixPath(); -console.log(process.env.PATH); // Handle creating/removing shortcuts on Windows when installing/uninstalling. if (require('electron-squirrel-startup')) { @@ -59,5 +57,3 @@ app.on('activate', () => { // In this file you can include the rest of your app's specific main process // code. You can also put them in separate files and import them here. - -