Allowing paths in use_module(library(..)) (#604)

In a module, the path is restricted in being an atom.
This commit is contained in:
notoria
2020-07-01 10:22:17 +02:00
parent 1eb42654e0
commit 83268f5ff6
9 changed files with 528 additions and 177 deletions

View File

@@ -602,12 +602,7 @@ fn load_library(
) -> Result<ClauseName, SessionError> {
match LIBRARIES.borrow().get(name.as_str()) {
Some(code) => {
let mut lib_path = current_dir();
lib_path.pop();
lib_path.push("lib");
let listing_src = ListingSource::from_file_and_path(name, lib_path);
let listing_src = ListingSource::User;
load_module(
wam,