diff options
author | Arun Isaac | 2025-04-22 22:05:58 +0100 |
---|---|---|
committer | Arun Isaac | 2025-04-22 22:19:32 +0100 |
commit | cf3d71bf43729d153e9240bc1df70c2f62cd4e49 (patch) | |
tree | 1cd0075c0b2daad6331419881b4ad24c6a423fc9 | |
parent | 91a52ca755f64c8336c1ba2753e0be978dd4f9b0 (diff) | |
download | ravanan-cf3d71bf43729d153e9240bc1df70c2f62cd4e49.tar.gz ravanan-cf3d71bf43729d153e9240bc1df70c2f62cd4e49.tar.lz ravanan-cf3d71bf43729d153e9240bc1df70c2f62cd4e49.zip |
reader: Use canonicalize-file-value.
* ravanan/reader.scm (normalize-input): Use canonicalize-file-value.
-rw-r--r-- | ravanan/reader.scm | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/ravanan/reader.scm b/ravanan/reader.scm index a28ce94..a4e57c7 100644 --- a/ravanan/reader.scm +++ b/ravanan/reader.scm @@ -263,26 +263,7 @@ array of array of @code{File}s, etc. Else, return @code{#f}" input)) ((eq? (object-type input) 'File) - (let ((path (canonicalize-path (cond - ((assoc-ref input "location") => location->path) - (else (assoc-ref input "path")))))) - (maybe-assoc-set input - (cons "basename" (just (basename path))) - (cons "nameroot" (just (file-name-stem path))) - (cons "nameext" (just (file-name-extension path))) - (cons "size" (just (stat:size (stat path)))) - (cons "location" (just (uri->string (build-uri 'file #:path path)))) - (cons "path" (just path)) - ;; Compute the checksum, but only if it is not provided. If it is - ;; provided, trust that it is correct. This avoids costly (think hashing - ;; terabytes of data) hash computations causing a long delay before the - ;; workflow actually starts running. - (cons "checksum" (just (or (assoc-ref input "checksum") - (checksum path)))) - (cons "secondaryFiles" - (maybe-let* ((secondary-files (maybe-assoc-ref (just input) - "secondaryFiles"))) - (just (vector-map normalize-input secondary-files))))))) + (canonicalize-file-value input)) (else input))) (define (read-inputs inputs-file) |