diff --git a/web/making_a_web_site.anubis b/web/making_a_web_site.anubis index dd86fca..e30b65e 100644 --- a/web/making_a_web_site.anubis +++ b/web/making_a_web_site.anubis @@ -2638,26 +2638,31 @@ define (String state_name) -> PreviousState($State) per states life time period). define (List(String) file_names) -> One - make_delete_out_of_date_states_function - ( - Maybe($State) dummy, - String state_directory - ) = - (List(String) file_names) |-df-> - if file_names is - { - [ ] then unique, - [h . t] then - with file_path = state_directory+"/"+h, - if (RetrieveResult((Int,$State)))retrieve(file_path) is ok(d) - then ( - if d is (time_stamp,data) then - if time_stamp < now - then (forget(remove(file_path)); df(t)) - else df(t) - ) - else (forget(remove(file_path)); df(t)) - }. + make_delete_out_of_date_states_function + ( + Maybe($State) dummy, + String state_directory + )= + (List(String) file_names) |-df-> + if file_names is + { + [ ] then unique, + [h . t] then + //we can't delete the "." and ".." file. So go to next file in the list + if h = "." | h = ".." then + df(t) + else + with file_path = state_directory+"/"+h, + if (RetrieveResult((Int,$State)))retrieve(file_path) is ok(d) + then ( + if d is (time_stamp,data) then + if time_stamp < now + then (forget(remove(file_path)); df(t)) + else df(t) + ) + else (forget(remove(file_path)); df(t)) + } +. The 'labelled arrow' |-df-> is documented in 'documentation/en/anubis_doc.txt'. -- libgit2 0.21.4