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.master
parent
8e7e414aa9
commit
814ee99da8
|
@ -2173,10 +2173,12 @@ valid inputs."
|
||||||
(define (store-path-hash-part path)
|
(define (store-path-hash-part path)
|
||||||
"Return the hash part of PATH as a base32 string, or #f if PATH is not a
|
"Return the hash part of PATH as a base32 string, or #f if PATH is not a
|
||||||
syntactically valid store path."
|
syntactically valid store path."
|
||||||
(let* ((base (store-path-base path))
|
(match (store-path-base path)
|
||||||
(hash (string-take base 32)))
|
(#f #f)
|
||||||
|
(base
|
||||||
|
(let ((hash (string-take base 32)))
|
||||||
(and (string-every %nix-base32-charset hash)
|
(and (string-every %nix-base32-charset hash)
|
||||||
hash)))
|
hash)))))
|
||||||
|
|
||||||
(define (derivation-log-file drv)
|
(define (derivation-log-file drv)
|
||||||
"Return the build log file for DRV, a derivation file name, or #f if it
|
"Return the build log file for DRV, a derivation file name, or #f if it
|
||||||
|
|
Reference in New Issue