fix path-join again, for old lua versions
This commit is contained in:
parent
cb9f09ba84
commit
c644ce54ab
@ -200,7 +200,10 @@ WARNING: this is only used in the test code, not in the real language server"
|
||||
(λ path-join [path suffix]
|
||||
(if (absolute-path? suffix) suffix
|
||||
(= path "") suffix
|
||||
(let [clean-path (path:gsub "[\\/]?$" path-sep) ; ensure trailing slash
|
||||
(let [;; ensure trailing slash
|
||||
;; we need to limit to 1 replacement because old
|
||||
;; versions of lua can match the pattern twice.
|
||||
clean-path (path:gsub "[\\/]?$" path-sep 1)
|
||||
clean-suffix (if (or (= (suffix:sub 1 2) "./")
|
||||
(= (suffix:sub 1 2) ".\\"))
|
||||
(suffix:sub 3)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user