]> Repositorios git - scryer-prolog.git/commitdiff
support full paths in load_context_path/2 (#916)
authorMark Thom <[email protected]>
Sat, 1 May 2021 02:38:26 +0000 (20:38 -0600)
committerMark Thom <[email protected]>
Sat, 1 May 2021 02:38:26 +0000 (20:38 -0600)
src/loader.pl

index 6324e7cda9336c60032f357fcde1529e74143668..de6e8c538eea44ec5c02c199ff9e2d3458074050 100644 (file)
@@ -463,7 +463,9 @@ use_module(Module, Exports) :-
 %% directory. Otherwise, use the relative path of Path.
 
 load_context_path(Module, Path) :-
-    (  prolog_load_context(directory, CurrentDir) ->
+    (  sub_atom(Module, 0, 1, _, '/') ->
+       Path = Module
+    ;  prolog_load_context(directory, CurrentDir) ->
        % Rust's Path module never ends a directory path with '/', so
        % add one here.
        atom_concat(CurrentDir, '/', CurrentDirSlashed),