mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
store: 'store-path-hash-part' really returns false for invalid file names.
The "store-path-hash-part #f", due to a SRFI-64 bug, was marked as successful even though 'store-path-hash-part' was throwing an exception. * guix/store.scm (store-path-hash-part): Really return #f.
This commit is contained in:
parent
8e7e414aa9
commit
814ee99da8
1 changed files with 6 additions and 4 deletions
|
@ -2173,10 +2173,12 @@ (define (store-path-package-name path)
|
|||
(define (store-path-hash-part path)
|
||||
"Return the hash part of PATH as a base32 string, or #f if PATH is not a
|
||||
syntactically valid store path."
|
||||
(let* ((base (store-path-base path))
|
||||
(hash (string-take base 32)))
|
||||
(and (string-every %nix-base32-charset hash)
|
||||
hash)))
|
||||
(match (store-path-base path)
|
||||
(#f #f)
|
||||
(base
|
||||
(let ((hash (string-take base 32)))
|
||||
(and (string-every %nix-base32-charset hash)
|
||||
hash)))))
|
||||
|
||||
(define (derivation-log-file drv)
|
||||
"Return the build log file for DRV, a derivation file name, or #f if it
|
||||
|
|
Loading…
Reference in a new issue