Skip to content

Commit eacaa4f

Browse files
committed
Filter out symlinks
1 parent 2053233 commit eacaa4f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,12 @@ function listFolder(folder) {
2222
return files
2323
}
2424

25-
function ilistFolder(folder, filesOnly) {
25+
function ilistFolder(folder) {
2626
let files = fs.readdirSync(path.resolve(folder))
27+
files = files.filter(f => {
28+
let filePath = path.resolve(folder, f)
29+
return !fs.lstatSync(filePath).isSymbolicLink()
30+
})
2731
files = files.map(f => {
2832
let filePath = path.resolve(folder, f)
2933
return {

0 commit comments

Comments
 (0)