Commit e39e9b0a authored by Siebers, Michael's avatar Siebers, Michael
Browse files

Introduced '/' as single atom to represent the root path.

parent 8b9ee956
......@@ -36,7 +36,10 @@ in_directory_(AbsPath, Dir) :-
AbsPath \= '/',
atom_string(AbsPath, PathStr),
re_matchsub("^(.*)/([^/]*)$", PathStr, Matches, []),
atom_string(Dir,Matches.1).
( Matches.1 = ""
-> Dir = '/'
; atom_string(Dir,Matches.1)
).
%! in_directory_recursive(++Item,?Directory) is nondet.
in_directory_recursive(Item,Directory) :- in_directory(Item,Directory).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment