Use basename for File/stat output

This commit is contained in:
Andrew Alderwick 2021-11-07 00:46:18 +00:00
parent 3acaaa2874
commit ea42a0bdd7
1 changed files with 6 additions and 1 deletions

View File

@ -130,7 +130,12 @@ file_write(void *src, Uint16 len, Uint8 flags)
Uint16
file_stat(void *dest, Uint16 len)
{
return get_entry(dest, len, current_filename, current_filename, 0);
char *basename = strrchr(current_filename, '/');
if(basename != NULL)
++basename;
else
basename = current_filename;
return get_entry(dest, len, current_filename, basename, 0);
}
Uint16