diff options
author | Arun Isaac | 2025-08-18 14:22:29 +0100 |
---|---|---|
committer | Arun Isaac | 2025-08-18 14:40:40 +0100 |
commit | ce07104835149c09aae78fac5ecc71bd682c5178 (patch) | |
tree | 01113892269fb33b4c171a50129139702b0eca1a | |
parent | 6649df00cfafa1150dcc81be651a7843d0d1f750 (diff) | |
download | ravanan-ce07104835149c09aae78fac5ecc71bd682c5178.tar.gz ravanan-ce07104835149c09aae78fac5ecc71bd682c5178.tar.lz ravanan-ce07104835149c09aae78fac5ecc71bd682c5178.zip |
work/command-line-tool: Always reconstruct location from path.
-rw-r--r-- | ravanan/work/command-line-tool.scm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ravanan/work/command-line-tool.scm b/ravanan/work/command-line-tool.scm index 38673a0..ef09658 100644 --- a/ravanan/work/command-line-tool.scm +++ b/ravanan/work/command-line-tool.scm @@ -253,10 +253,12 @@ condition on unsupported URI schemes." (define (canonicalize-file-value value) "Canonicalize @code{File} type @var{value} adding missing fields." - (let ((path (or (assoc-ref value "path") - (location->path (assoc-ref value "location")))) - (location (or (assoc-ref value "location") - (string-append "file://" (assoc-ref value "path"))))) + (let* ((path (or (assoc-ref value "path") + (location->path (assoc-ref value "location")))) + ;; The location field may actually be a path instead of an URI; that's + ;; invalid. So, unconditionally reconstruct the location URI from path. + ;; This assumes they are always file:// URIs, but that works for now. + (location (string-append "file://" path))) ;; Populate all fields of the File type value. (maybe-assoc-set `(("class" . "File") ("location" . ,location) |