raco setup: accomodate unusual flie names in pkg-dep checking
If a source file name lacks an extension, then the pkg-step would get confused trying to convert a ".zo" name back to a source name. The original name is not really needed, anyway.
This commit is contained in:
parent
429436fb77
commit
a07e973316
|
@ -365,7 +365,9 @@
|
||||||
(when (file-exists? (build-path dir zo-f))
|
(when (file-exists? (build-path dir zo-f))
|
||||||
(define base (let ([m (regexp-match #rx#"^(.*)_[^_]+[.]zo$"
|
(define base (let ([m (regexp-match #rx#"^(.*)_[^_]+[.]zo$"
|
||||||
(path-element->bytes zo-f))])
|
(path-element->bytes zo-f))])
|
||||||
(and m (bytes->string/utf-8 (cadr m)))))
|
(or (and m (bytes->string/utf-8 (cadr m)))
|
||||||
|
;; In case the original file name had no suffix:
|
||||||
|
"unknown")))
|
||||||
(define in-mod `(lib ,(string-join
|
(define in-mod `(lib ,(string-join
|
||||||
(append (map path-element->string coll-path) (list base))
|
(append (map path-element->string coll-path) (list base))
|
||||||
"/")))
|
"/")))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user