fix file_base_name (obs from Paulo Moura).

This commit is contained in:
Vitor Santos Costa 2010-09-24 19:47:05 +01:00
parent 99c5a17b12
commit 96dd342cbc
1 changed files with 3 additions and 0 deletions

View File

@ -6462,6 +6462,9 @@ p_file_base_name (void)
char *c = RepAtom(at)->StrOfAE;
Int i = strlen(c);
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)));
}
}