mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-26 19:21:50 +01:00
don't change dir names for display
This commit is contained in:
parent
5d43ddfe01
commit
98625560d4
@ -386,23 +386,25 @@ ParseDirectory(int method)
|
|||||||
{
|
{
|
||||||
browserList = newBrowserList;
|
browserList = newBrowserList;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&(browserList[entryNum]), 0, sizeof(BROWSERENTRY)); // clear the new entry
|
memset(&(browserList[entryNum]), 0, sizeof(BROWSERENTRY)); // clear the new entry
|
||||||
|
|
||||||
strncpy(browserList[entryNum].filename, filename, MAXJOLIET);
|
strncpy(browserList[entryNum].filename, filename, MAXJOLIET);
|
||||||
|
browserList[entryNum].length = filestat.st_size;
|
||||||
|
browserList[entryNum].mtime = filestat.st_mtime;
|
||||||
|
browserList[entryNum].isdir = (filestat.st_mode & _IFDIR) == 0 ? 0 : 1; // flag this as a dir
|
||||||
|
|
||||||
if(strcmp(filename,"..") == 0)
|
if(browserList[entryNum].isdir)
|
||||||
{
|
{
|
||||||
|
if(strcmp(filename, "..") == 0)
|
||||||
sprintf(browserList[entryNum].displayname, "Up One Level");
|
sprintf(browserList[entryNum].displayname, "Up One Level");
|
||||||
|
else
|
||||||
|
strncpy(browserList[entryNum].displayname, browserList[entryNum].filename, MAXJOLIET);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
StripExt(browserList[entryNum].displayname, browserList[entryNum].filename); // hide file extension
|
StripExt(browserList[entryNum].displayname, browserList[entryNum].filename); // hide file extension
|
||||||
}
|
}
|
||||||
|
|
||||||
browserList[entryNum].length = filestat.st_size;
|
|
||||||
browserList[entryNum].mtime = filestat.st_mtime;
|
|
||||||
browserList[entryNum].isdir = (filestat.st_mode & _IFDIR) == 0 ? 0 : 1; // flag this as a dir
|
|
||||||
|
|
||||||
entryNum++;
|
entryNum++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user