better shell-string protection
svn: r3396
This commit is contained in:
parent
ec8d820bf2
commit
00ecf6acae
|
@ -240,8 +240,8 @@
|
||||||
args))))))
|
args))))))
|
||||||
|
|
||||||
(define (protect-shell-string s)
|
(define (protect-shell-string s)
|
||||||
(let ([s (if (path? s) (path->string s) s)])
|
(regexp-replace*
|
||||||
(regexp-replace* #rx"[\"$`]" s "\\\\&")))
|
#rx"[\"`'$\\]" (if (path? s) (path->string s) s) "\\\\&"))
|
||||||
|
|
||||||
(define (normalize+explode-path p)
|
(define (normalize+explode-path p)
|
||||||
(explode-path (normal-case-path (normalize-path p))))
|
(explode-path (normal-case-path (normalize-path p))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user