Skip to content

Commit 80486f1

Browse files
Fix getFolderTreeItem method
1 parent 517fa48 commit 80486f1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/files.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ function getRelativePath(filePath, referenceFolderPath) {
1717
return relativePath;
1818
}
1919

20-
2120
function getFolderTreeItem(prefix, absolutePath) {
21+
const isDirectory = absolutePath.includes(':') ? false : fsSync.statSync(absolutePath).isDirectory();
2222
return {
2323
line: `${prefix}${path.basename(absolutePath)}`,
24-
absolutePath: absolutePath
25-
}
24+
absolutePath,
25+
isDirectory
26+
};
2627
}
2728

2829
function isPathInside(basePath, targetPath) {

0 commit comments

Comments
 (0)