guix download: Ensure destination file-name is valid in the store.
authorHartmut Goebel <h.goebel@crazy-compilers.com>
Thu, 8 Aug 2019 14:43:15 +0000 (16:43 +0200)
committerHartmut Goebel <h.goebel@crazy-compilers.com>
Thu, 26 Sep 2019 15:48:08 +0000 (17:48 +0200)
commitdec845606d2d184da31065fa26cd951b84b3ce2d
tree1e57f8faccfc8a133326fc5155fe25e2b019773e
parent6eb1d20b682d1256bb4561517daa616b15fec22b
guix download: Ensure destination file-name is valid in the store.

Avoid invalid store-file-name by explicitly passing the destination
name, replacing any character not allowed in the store-file-name by an
underscore.

Fixes <http://issues.guix.gnu.org/issue/26175>

* guix/scripts/download.scm (safe-naensure-valid-store-file-nameme):
  New function. (download-to-store*): Use it to generate a "safe"
  basename of URL.
guix/scripts/download.scm