diff options
-rw-r--r-- | share/txr/stdlib/path-test.tl | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/share/txr/stdlib/path-test.tl b/share/txr/stdlib/path-test.tl index bc71cc4c..851ac61b 100644 --- a/share/txr/stdlib/path-test.tl +++ b/share/txr/stdlib/path-test.tl @@ -100,14 +100,14 @@ (defun path-private-to-me-p (path) (sys:path-test (s stat path) (let ((m s.mode) - (euid (geteuid)) - (g (getgrgid s.gid))) - (and (eql euid s.uid) - (zerop (logand m s-iwoth)) - (or (zerop (logand m s-iwgrp)) - (null g.mem) - (and (not (rest g.mem)) - (equal (getpwuid euid).name (first g.mem)))))))) + (euid (geteuid))) + (mlet ((g (getgrgid s.gid))) + (and (eql euid s.uid) + (zerop (logand m s-iwoth)) + (or (zerop (logand m s-iwgrp)) + (null g.mem) + (and (not (rest g.mem)) + (equal (getpwuid euid).name (first g.mem))))))))) (defmacro sys:path-examine ((var statfun path) . body) ^[sys:do-path-test ,statfun ,path |