Virtual ISO: Use the actual basename function and remove the legacy one

This commit is contained in:
RichardG867
2022-07-09 13:43:13 -03:00
parent 9bdec4a1d9
commit bcd12099c7
4 changed files with 1 additions and 37 deletions

View File

@@ -902,7 +902,7 @@ next_dir:
tz_offset = (now - mktime(gmtime(&now))) / (3600 / 4);
/* Get root directory basename for the volume ID. */
char *basename = plat_get_basename(dirname);
char *basename = path_get_filename(viso->root_dir->path);
if (!basename || (basename[0] == '\0'))
basename = EMU_NAME;

View File

@@ -194,13 +194,6 @@ plat_getcwd(char *bufp, int max)
return 0;
}
char *
plat_get_basename(const char *path)
{
QFileInfo fi(path);
return fi.fileName().toUtf8().data();
}
void
path_get_dirname(char *dest, const char *path)
{

View File

@@ -326,19 +326,6 @@ plat_put_backslash(char *s)
/* Return the last element of a pathname. */
char *
plat_get_basename(const char *path)
{
int c = (int)strlen(path);
while (c > 0) {
if (path[c] == '/')
return((char *)&path[c + 1]);
c--;
}
return((char *)path);
}
char *
path_get_filename(char *s)
{
int c = strlen(s) - 1;

View File

@@ -764,22 +764,6 @@ path_abs(char *path)
}
/* Return the last element of a pathname. */
char *
plat_get_basename(const char *path)
{
int c = (int)strlen(path);
while (c > 0) {
if (path[c] == '/' || path[c] == '\\')
return((char *)&path[c + 1]);
c--;
}
return((char *)path);
}
/* Return the 'directory' element of a pathname. */
void
path_get_dirname(char *dest, const char *path)