unix installer: repair .desktop exec path conversion

This commit is contained in:
Matthew Flatt 2013-11-19 15:50:12 -07:00
parent 408031a01d
commit 17275e3f37

View File

@ -272,7 +272,11 @@
(define new-ls (for/list ([l (in-list ls)])
(cond
[(regexp-match? #rx"^Exec=" l)
(format "Exec=~a" (fixup-path bindir (substring l 5)))]
;; Assume anything after a space is the argument spec:
(let ([m (regexp-match #rx"Exec=([^ ]*)(.*)" l)])
(format "Exec=~a~a"
(fixup-path bindir (cadr m))
(caddr m)))]
[(regexp-match? #rx"^Icon=" l)
(format "Icon=~a" (fixup-path sharerktdir (substring l 5)))]
[else l])))