* fix bug in nandBin class that added the "/" root item to the path being extracted to

git-svn-id: http://wiiqt.googlecode.com/svn/trunk@17 389f4c8b-5dfe-645f-db0e-df882bc27289
This commit is contained in:
giantpune@gmail.com 2010-12-11 11:05:37 +00:00
parent 034e487a31
commit 71314d484c

View File

@ -160,11 +160,15 @@ bool NandBin::ExtractDir( fst_t fst, QString parent )
QByteArray ba( (char*)fst.filename, 0xc );
QString filename( ba );
QFileInfo fi( parent + "/" + filename );
if( filename != "/" && !fi.exists() && !QDir().mkpath( fi.absoluteFilePath() ) )
QFileInfo fi( parent );
if( filename != "/" )
{
emit SendError( tr( "Can\'t create directory \"%1\"" ).arg( fi.absoluteFilePath() ) );
return false;
fi.setFile( parent + "/" + filename );
if( !fi.exists() && !QDir().mkpath( fi.absoluteFilePath() ) )
{
emit SendError( tr( "Can\'t create directory \"%1\"" ).arg( fi.absoluteFilePath() ) );
return false;
}
}
if( fst.sub != 0xffff && !ExtractFST( fst.sub, fi.absoluteFilePath() ) )