aboutsummaryrefslogtreecommitdiff
path: root/src/property.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2021-06-07 10:05:40 -0700
committerSean Whitton <spwhitton@spwhitton.name>2021-06-07 16:07:58 -0700
commit1f489eb1936921f1f029ca9543480490ca89ae67 (patch)
tree859627db4a06fe0d75b1a6a1178807ba9ce0d7a5 /src/property.lisp
parentc687d10681cb4455e27dceec68aa5379305ec76c (diff)
downloadconsfigurator-1f489eb1936921f1f029ca9543480490ca89ae67.tar.gz
ls(1) parse: set LC_ALL not just LOCALE, and split fields properly
Previously our code assumed fields were separated with exactly one space, but sometimes there is padding. Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/property.lisp')
-rw-r--r--src/property.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/property.lisp b/src/property.lisp
index f5c9680..3561267 100644
--- a/src/property.lisp
+++ b/src/property.lisp
@@ -568,7 +568,7 @@ PATH already has the specified CONTENT and MODE."
;; this is a safe parse of ls(1) output given its POSIX specification
(defun ls-cksum (file)
(let ((ls (ignore-errors
- (split-string (run :env '(:LOCALE "C") "ls" "-dlL" file))))
+ (words (run :env '(:LC_ALL "C") "ls" "-dlL" file))))
(cksum (ignore-errors (cksum file))))
(when (and ls cksum)
(list* (car ls) cksum (subseq ls 2 8)))))