swish/commit
New upstream file
author | Jan Wielemaker |
---|---|
Sat Mar 21 17:22:14 2015 +0100 | |
committer | Jan Wielemaker |
Sat Mar 21 17:22:14 2015 +0100 | |
commit | 2844daf7c7930c96fb760e52110b8599597b3c42 |
tree | 54d0b6055790b6192a9926f3982d3a655c81d27d |
parent | 036a47111af24fc90857335130a187f0dc5559fa |
Diff style: patch stat
diff --git a/lib/swish/examples.pl b/lib/swish/examples.pl index 17ddc87..484aa8b 100644 --- a/lib/swish/examples.pl +++ b/lib/swish/examples.pl @@ -111,8 +111,11 @@ read_file_to_json(File, JSON) :- json_read_dict(In, JSON), close(In)). -add_href(HREF0, Dict, Dict.put(href, HREF)) :- - directory_file_path(HREF0, Dict.file, HREF). +add_href(HREF0, Dict, Dict2) :- + is_dict(Dict), + directory_file_path(HREF0, Dict.get(file), HREF), !, + Dict2 = Dict.put(href, HREF). +add_href(_, Dict, Dict). %% ex_file_json(+ExampleBase, +Path, -JSON) is det. %