From 3d5e4f98d2bc6a370b8db726568e6feecb93d20a Mon Sep 17 00:00:00 2001 From: tom-shan Date: Fri, 28 Feb 2020 22:21:34 +0800 Subject: [PATCH] fix https://github.com/eclipse-theia/theia/issues/7240 using statSync instead of lstatSync, so isFile or isDirectory will check what the symbolic link refer to but not the link itself. Signed-off-by: tom-shan --- .../plugin-ext/src/main/node/plugin-deployer-entry-impl.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/plugin-ext/src/main/node/plugin-deployer-entry-impl.ts b/packages/plugin-ext/src/main/node/plugin-deployer-entry-impl.ts index 6c6c86aba6684..746acc3931a64 100644 --- a/packages/plugin-ext/src/main/node/plugin-deployer-entry-impl.ts +++ b/packages/plugin-ext/src/main/node/plugin-deployer-entry-impl.ts @@ -72,14 +72,14 @@ export class PluginDeployerEntryImpl implements PluginDeployerEntry { } isFile(): boolean { try { - return fs.lstatSync(this.currentPath).isFile(); + return fs.statSync(this.currentPath).isFile(); } catch (e) { return false; } } isDirectory(): boolean { try { - return fs.lstatSync(this.currentPath).isDirectory(); + return fs.statSync(this.currentPath).isDirectory(); } catch (e) { return false; }