aboutsummaryrefslogtreecommitdiff
path: root/src/connection.lisp
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-11-04 15:32:17 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-11-29 11:00:47 -0700
commit60da5db58bb50764ede4d3c37ea2416153774958 (patch)
treec452ec7f9dd7da943284f87d4ee8642d5c6523b4 /src/connection.lisp
parent900c622272c0592d06b1c347c32c783da1309bca (diff)
downloadconsfigurator-60da5db58bb50764ede4d3c37ea2416153774958.tar.gz
FILE:HAS-OWNERSHIP: avoid chown'ing when no ownership change needed
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/connection.lisp')
-rw-r--r--src/connection.lisp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/connection.lisp b/src/connection.lisp
index b03e33e..d051ad6 100644
--- a/src/connection.lisp
+++ b/src/connection.lisp
@@ -550,8 +550,8 @@ PATH may be any kind of file, including directories."
when (cdr path) collect "-a")))
(defun remote-file-stats (path)
- "Get the numeric mode, size in bytes and mtime of PATH, or NIL if it does not
-exist.
+ "Get the numeric mode, size in bytes, mtime, owner and group of PATH, or NIL if
+it does not exist.
The mtime is only accurate to the nearest UTC day, rounding down, if the file
was modified in the past six months or its mtime is in the future, and only
@@ -593,7 +593,9 @@ specification of POSIX ls(1))."
date month (nth-value 5 (get-decoded-time))
0))
(encode-universal-time
- 0 0 0 date month (parse-integer (nth 7 ls)) 0))))))))
+ 0 0 0 date month (parse-integer (nth 7 ls)) 0)))
+ (nth 2 ls)
+ (nth 3 ls))))))
(defun remote-last-reboot ()
"Get the time of the last reboot, rounded down to the nearest minute."