diff --git a/pl/absf.yap b/pl/absf.yap index 71948ea8b..b7f4809c1 100644 --- a/pl/absf.yap +++ b/pl/absf.yap @@ -221,11 +221,10 @@ absolute_file_name(File,Opts,TrueFileName) :- '$check_file'(F, _Type, none, F) :- !. '$check_file'(F0, Type, Access, F0) :- access_file(F0, Access), - (Type == directory - -> + (Type == directory -> exists_directory(F0) ; - true + \+ exists_directory(F0) % if it has a type cannot be a directory. ). '$add_extensions'([Ext|_],File,F) :-