fix: do not ignore patterns in parent dir

Fixes #3310
This commit is contained in:
Andelf
2021-12-01 16:39:46 +08:00
committed by Tienson Qin
parent d7759aeb79
commit f5c9750c12

View File

@@ -47,8 +47,9 @@
["." ".recycle" "assets" "node_modules"])
(string/ends-with? path ".DS_Store")
;; hidden directory or file
(re-find #"/\.[^.]+" path)
(re-find #"^\.[^.]+" path)
(let [relpath (path/relative dir path)]
(or (re-find #"/\.[^.]+" relpath)
(re-find #"^\.[^.]+" relpath)))
(let [path (string/lower-case path)]
(and
(not (string/blank? (path/extname path)))