Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Charlie
2026-05-11 09:56:11 +08:00
committed by GitHub
parent 2a40b5edd0
commit 970fd04ad4

View File

@@ -59,9 +59,11 @@
(defn- sub-path?
[root-dir path]
(let [relative (.relative util/node-path root-dir path)]
(let [relative (.relative util/node-path root-dir path)
parent-dir-segment? (or (= relative "..")
(string/starts-with? relative (str ".." (.-sep util/node-path))))]
(or (string/blank? relative)
(and (not (string/starts-with? relative ".."))
(and (not parent-dir-segment?)
(not (.isAbsolute util/node-path relative))))))
(defn- assert-storage-path!