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

Lines changed: 5 additions & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy