Commit 7210358c774472fc79a396355a524483d14c978b

Thomas de Grivel 2024-07-16T12:26:42

fix op-chown

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
diff --git a/unix/operations.lisp b/unix/operations.lisp
index b7a85cd..4d678d2 100644
--- a/unix/operations.lisp
+++ b/unix/operations.lisp
@@ -125,10 +125,9 @@
         (g (if group
                (resource-id group)
                gid)))
-    (declare (type string u)
-             (type (or null string) g))
+    (declare (type (or null string) u g))
     (run "chown "
-         (sh-quote u)
+         (when u (sh-quote u))
          (when g `(":" ,(sh-quote g)))
          " "
          (sh-quote (resource-id res)))))