Skip to content

Commit

Permalink
fix #7240
Browse files Browse the repository at this point in the history
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 <swt0008411@163.com>
  • Loading branch information
tom-shan authored and azatsarynnyy committed Mar 4, 2020
1 parent d14f7c6 commit 3d5e4f9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3d5e4f9

Please sign in to comment.