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

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
)