From d00f9235e33a9a6390be5253cab6582bd82aa537 Mon Sep 17 00:00:00 2001 From: "giantpune@gmail.com" Date: Tue, 3 May 2011 07:13:42 +0000 Subject: [PATCH] *ohneswanzenegger: fix setting.txt bug git-svn-id: http://wiiqt.googlecode.com/svn/trunk@81 389f4c8b-5dfe-645f-db0e-df882bc27289 --- ohneschwanzenegger/mainwindow.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ohneschwanzenegger/mainwindow.cpp b/ohneschwanzenegger/mainwindow.cpp index 669127e..591635c 100644 --- a/ohneschwanzenegger/mainwindow.cpp +++ b/ohneschwanzenegger/mainwindow.cpp @@ -298,7 +298,8 @@ void MainWindow::on_actionSetting_txt_triggered() ba = SettingTxtDialog::Edit( this, ba ); //call a dialog to edit that existing file and store the result in the same bytearray if( !ba.isEmpty() ) //if the dialog returned anything ( cancel wasnt pressed ) write that new setting.txt to the nand dump { - if( !nand.SetData( "/title/00000001/00000002/data/setting.txt", ba ) + quint16 r = CreateIfNeeded( "/title/00000001/00000002/data/setting.txt", 0x1000, 1, NAND_FILE, NAND_READ, NAND_READ, NAND_READ ); + if( !nand.SetData( r, ba ) || !nand.WriteMetaData() ) { ShowMessage( tr( "Error writing setting.txt" ) ); @@ -624,8 +625,8 @@ bool MainWindow::InstallNUSItem( NusJob job ) QString upper = tid.left( 8 ); QString lower = tid.right( 8 ); - Tmd t( job.data.takeFirst() ); - Ticket ticket( job.data.takeFirst() ); + Tmd t( job.data.takeFirst() ); + Ticket ticket( job.data.takeFirst() ); if( t.Tid() != job.tid || ticket.Tid() != job.tid ) { qWarning() << "bad tid";