From 72c63189e11fab51164299c899e14100442632cb Mon Sep 17 00:00:00 2001 From: Nathaniel Smith Date: Tue, 10 Feb 2015 10:45:37 -0800 Subject: [PATCH] fix find permission issue with a hack --- scripts/userlist.hy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/userlist.hy b/scripts/userlist.hy index 79a83b5..f057092 100644 --- a/scripts/userlist.hy +++ b/scripts/userlist.hy @@ -26,9 +26,11 @@ "(default :3)" "")))) +(defn bounded-find [path] (find path "-maxdepth" "3")) + (defn modify-time [username] (->> (.format "/home/{}/public_html" username) - find + bounded-find (map (fn [filename] (getmtime (.rstrip filename)))) list max))