aboutsummaryrefslogtreecommitdiff
path: root/src/property/file.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/file.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/file.lisp')
-rw-r--r--src/property/file.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/property/file.lisp b/src/property/file.lisp
index a54d38c..70d2679 100644
--- a/src/property/file.lisp
+++ b/src/property/file.lisp
@@ -136,7 +136,7 @@ Uses CL-PPCRE:REGEX-REPLACE, which see for the syntax of REPLACE."
;; readlink(1) is not POSIX
(defun remote-link-target (symlink)
- (loop with s = (stripln (run :env '(:LOCALE "POSIX") "ls" "-ld" symlink))
+ (loop with s = (stripln (run :env '(:LC_ALL "C") "ls" "-ld" symlink))
with found = 0
for i from 0 below (length s)
when (char= (elt s i) #\Space)