aboutsummaryrefslogtreecommitdiff
path: root/src/connection.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/connection.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/connection.lisp')
-rw-r--r--src/connection.lisp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/connection.lisp b/src/connection.lisp
index 3f979d2..9f945a1 100644
--- a/src/connection.lisp
+++ b/src/connection.lisp
@@ -467,7 +467,7 @@ PATH may be any kind of file, including directories."
(#\x order)
(#\- 0)))))
(and (remote-exists-p path)
- (let* ((ls (split-string (run "ls" "-ld" path)))
+ (let* ((ls (words (run :env '(:LC_ALL "C") "ls" "-ld" path)))
(lscar (car ls)))
(values (+ (sum (subseq lscar 1 4) #o100)
(sum (subseq lscar 4 7) #o10)