mirror of
https://github.com/LongSoft/UEFITool.git
synced 2024-11-22 07:58:22 +08:00
Fix directory creation error in UEFIExtract default mode
This commit is contained in:
parent
e7455409ff
commit
2cbd78fb9e
@ -165,6 +165,7 @@ USTATUS FfsDumper::recursiveDump(const UModelIndex & index, const UString & path
|
||||
}
|
||||
|
||||
USTATUS result;
|
||||
|
||||
for (int i = 0; i < model->rowCount(index); i++) {
|
||||
UModelIndex childIndex = index.child(i, 0);
|
||||
bool useText = FALSE;
|
||||
@ -172,9 +173,13 @@ USTATUS FfsDumper::recursiveDump(const UModelIndex & index, const UString & path
|
||||
useText = !model->text(childIndex).isEmpty();
|
||||
|
||||
UString childPath = path;
|
||||
if (dumpMode == DUMP_ALL || dumpMode == DUMP_CURRENT)
|
||||
if (dumpMode == DUMP_ALL || dumpMode == DUMP_CURRENT) {
|
||||
if (!changeDirectory(path) && !makeDirectory(path))
|
||||
return U_DIR_CREATE;
|
||||
|
||||
childPath = usprintf("%s/%d %s", path.toLocal8Bit(), i,
|
||||
(useText ? model->text(childIndex) : model->name(childIndex)).toLocal8Bit());
|
||||
}
|
||||
result = recursiveDump(childIndex, childPath, dumpMode, sectionType, guid);
|
||||
if (result)
|
||||
return result;
|
||||
|
@ -233,8 +233,8 @@ USTATUS NvramParser::parseNvarStore(const UModelIndex & index)
|
||||
nvarIndex = index.child(i, 0);
|
||||
if (model->hasEmptyParsingData(nvarIndex) == false) {
|
||||
UByteArray nvarData = model->parsingData(nvarIndex);
|
||||
const NVAR_ENTRY_PARSING_DATA* nvarPdata = (const NVAR_ENTRY_PARSING_DATA*)nvarData.constData();
|
||||
if (nvarPdata->isValid && nvarPdata->next + model->offset(nvarIndex) - localOffset == offset) { // Previous link is present and valid
|
||||
const NVAR_ENTRY_PARSING_DATA nvarPdata = readUnaligned((const NVAR_ENTRY_PARSING_DATA*)nvarData.constData());
|
||||
if (nvarPdata.isValid && nvarPdata.next + model->offset(nvarIndex) - localOffset == offset) { // Previous link is present and valid
|
||||
isInvalidLink = false;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user