mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
(scm_primitive_load_path): Do not check for absolute filenames when
scm_sys_search_load_path returns false, which will return absolute filenames unchanged.
This commit is contained in:
parent
bb26cc2d28
commit
ffa747a6ea
1 changed files with 2 additions and 15 deletions
|
@ -468,24 +468,11 @@ SCM_DEFINE (scm_primitive_load_path, "primitive-load-path", 1, 0, 0,
|
||||||
{
|
{
|
||||||
SCM full_filename;
|
SCM full_filename;
|
||||||
|
|
||||||
SCM_VALIDATE_STRING (1, filename);
|
|
||||||
|
|
||||||
full_filename = scm_sys_search_load_path (filename);
|
full_filename = scm_sys_search_load_path (filename);
|
||||||
|
|
||||||
if (scm_is_false (full_filename))
|
if (scm_is_false (full_filename))
|
||||||
{
|
SCM_MISC_ERROR ("Unable to find file ~S in load path",
|
||||||
int absolute = (SCM_STRING_LENGTH (filename) >= 1
|
scm_list_1 (filename));
|
||||||
#ifdef __MINGW32__
|
|
||||||
&& (SCM_STRING_CHARS (filename)[0] == '/' ||
|
|
||||||
SCM_STRING_CHARS (filename)[0] == '\\'));
|
|
||||||
#else
|
|
||||||
&& SCM_STRING_CHARS (filename)[0] == '/');
|
|
||||||
#endif
|
|
||||||
SCM_MISC_ERROR ((absolute
|
|
||||||
? "Unable to load file ~S"
|
|
||||||
: "Unable to find file ~S in load path"),
|
|
||||||
scm_list_1 (filename));
|
|
||||||
}
|
|
||||||
|
|
||||||
return scm_primitive_load (full_filename);
|
return scm_primitive_load (full_filename);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue