fix file_base_name (obs from Paulo Moura).
This commit is contained in:
parent
99c5a17b12
commit
96dd342cbc
@ -6462,6 +6462,9 @@ p_file_base_name (void)
|
|||||||
char *c = RepAtom(at)->StrOfAE;
|
char *c = RepAtom(at)->StrOfAE;
|
||||||
Int i = strlen(c);
|
Int i = strlen(c);
|
||||||
while (i && !Yap_dir_separator((int)c[--i]));
|
while (i && !Yap_dir_separator((int)c[--i]));
|
||||||
|
if (Yap_dir_separator((int)c[i])) {
|
||||||
|
i++;
|
||||||
|
}
|
||||||
return Yap_unify(ARG2, MkAtomTerm(Yap_LookupAtom(c+i)));
|
return Yap_unify(ARG2, MkAtomTerm(Yap_LookupAtom(c+i)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user