From 1f489eb1936921f1f029ca9543480490ca89ae67 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 7 Jun 2021 10:05:40 -0700 Subject: 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 --- src/property.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/property.lisp') 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))))) -- cgit v1.2.3