use atom_chars to convert .scryerrc path string to atom

This commit is contained in:
Mark Thom
2021-02-28 23:26:22 -07:00
parent 498c4660d0
commit e8971e0d8b
3 changed files with 3 additions and 5 deletions

2
Cargo.lock generated
View File

@@ -1200,7 +1200,7 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
[[package]]
name = "scryer-prolog"
version = "0.8.127"
version = "0.8.128"
dependencies = [
"base64",
"blake2",

View File

@@ -1,6 +1,6 @@
[package]
name = "scryer-prolog"
version = "0.8.127"
version = "0.8.128"
authors = ["Mark Thom <markjordanthom@gmail.com>"]
edition = "2018"
description = "A modern Prolog implementation written mostly in Rust."

View File

@@ -14,9 +14,7 @@ load_scryerrc :-
( '$home_directory'(HomeDir) ->
append(HomeDir, "/.scryerrc", ScryerrcFile),
( file_exists(ScryerrcFile) ->
% convert ScryerrcFile to atom. somehow, I dunno how.
append(ScryerrcFile, "'.", ScryerrcFile0),
read_term_from_chars(['\'' | ScryerrcFile0], ScryerrcFileAtom),
atom_chars(ScryerrcFileAtom, ScryerrcFile),
catch(use_module(ScryerrcFileAtom), E, print_exception(E))
; true
)