Viewing directory now does updates.
authorTim Vaughan <plugd@thelambdalab.xyz>
Mon, 1 Jun 2020 16:53:24 +0000 (18:53 +0200)
committerTim Vaughan <plugd@thelambdalab.xyz>
Mon, 1 Jun 2020 16:53:24 +0000 (18:53 +0200)
directory.gmi

index 9c84035..fe7b2f8 100755 (executable)
            (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))))
 ```