From 9bb088cdb18f58aa9f4c1f14d2c4709d6ba5701b Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Mon, 1 Jun 2020 18:53:24 +0200 Subject: [PATCH] Viewing directory now does updates. --- directory.gmi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/directory.gmi b/directory.gmi index 9c84035..fe7b2f8 100755 --- a/directory.gmi +++ b/directory.gmi @@ -24,11 +24,13 @@ (print-rule total-width) (for-each (lambda (garden-file) - (let* ((g (with-input-from-file garden-file read)) - (fields (list (garden-prop 'user g) - (seconds->string (garden-prop 'created g)) - (garden-stage g)))) - (apply print (map pad-string fields colwidths)))) + (let ((g (with-input-from-file garden-file read))) + (update-garden! g) + (with-output-to-file garden-file (lambda () write g)) + (let ((fields (list (garden-prop 'user g) + (seconds->string (garden-prop 'created g)) + (garden-stage g)))) + (apply print (map pad-string fields colwidths))))) (glob "accounts/*")) (print-rule total-width)))) ``` -- 2.20.1