mirror of
https://github.com/dborth/vbagx.git
synced 2024-12-27 03:01:50 +01:00
small bugfixes
This commit is contained in:
parent
f1c2d1db4b
commit
b042913f10
@ -27,10 +27,9 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
u64 offset; // DVD offset
|
||||
unsigned int length; // file length
|
||||
size_t length; // file length
|
||||
time_t mtime; // file modified time
|
||||
char isdir; // 0 - file, 1 - directory
|
||||
int isdir; // 0 - file, 1 - directory
|
||||
char filename[MAXJOLIET + 1]; // full filename
|
||||
char displayname[MAXJOLIET + 1]; // name for browser display
|
||||
int icon; // icon to display
|
||||
|
@ -597,6 +597,7 @@ ParseDirectory(bool waitParse)
|
||||
browserList[0].length = 0;
|
||||
browserList[0].mtime = 0;
|
||||
browserList[0].isdir = 1; // flag this as a dir
|
||||
browserList[0].icon = ICON_FOLDER;
|
||||
}
|
||||
|
||||
parseHalt = false;
|
||||
@ -662,7 +663,7 @@ LoadSzFile(char * filepath, unsigned char * rbuffer)
|
||||
file = fopen (filepath, "rb");
|
||||
if (file > 0)
|
||||
{
|
||||
size = SzExtractFile(browserList[browser.selIndex].offset, rbuffer);
|
||||
size = SzExtractFile(atoi(browserList[browser.selIndex].filename), rbuffer);
|
||||
fclose (file);
|
||||
}
|
||||
else
|
||||
|
@ -370,7 +370,6 @@ int SzParse(char * filepath)
|
||||
|
||||
// save the length/offset of this file
|
||||
unsigned int filelen = browserList[browser.selIndex].length;
|
||||
u64 fileoff = browserList[browser.selIndex].offset;
|
||||
|
||||
// setup archive stream
|
||||
SzArchiveStream.offset = 0;
|
||||
@ -421,7 +420,6 @@ int SzParse(char * filepath)
|
||||
// add '..' folder in case the user wants exit the 7z
|
||||
sprintf(browserList[0].displayname, "Up One Level");
|
||||
browserList[0].isdir = 1;
|
||||
browserList[0].offset = fileoff;
|
||||
browserList[0].length = filelen;
|
||||
|
||||
// get contents and parse them into file list structure
|
||||
@ -451,10 +449,9 @@ int SzParse(char * filepath)
|
||||
memset(&(browserList[SzJ]), 0, sizeof(BROWSERENTRY)); // clear the new entry
|
||||
|
||||
// parse information about this file to the file list structure
|
||||
strncpy(browserList[SzJ].filename, SzF->Name, MAXJOLIET);
|
||||
StripExt(browserList[SzJ].displayname, browserList[SzJ].filename);
|
||||
sprintf(browserList[SzJ].filename, "%d", SzI); // the extraction function identifies the file with this number
|
||||
StripExt(browserList[SzJ].displayname, SzF->Name);
|
||||
browserList[SzJ].length = SzF->Size; // filesize
|
||||
browserList[SzJ].offset = SzI; // the extraction function identifies the file with this number
|
||||
browserList[SzJ].isdir = 0; // only files will be displayed (-> no flags)
|
||||
SzJ++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user