summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/base/voicefile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/base/voicefile.cpp')
-rw-r--r--rbutil/rbutilqt/base/voicefile.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/voicefile.cpp b/rbutil/rbutilqt/base/voicefile.cpp
index 2ccdd05c09..ccdf6f7f9a 100644
--- a/rbutil/rbutilqt/base/voicefile.cpp
+++ b/rbutil/rbutilqt/base/voicefile.cpp
@@ -199,16 +199,19 @@ void VoiceFileCreator::downloadDone(bool error)
199 return; 199 return;
200 } 200 }
201 201
202 FILE* output = fopen(QString(m_mountpoint + "/.rockbox/langs/" + m_lang + ".voice").toLocal8Bit(), "wb"); 202 FILE* output = fopen(QString(m_mountpoint + "/.rockbox/langs/" + m_lang
203 + ".voice").toLocal8Bit(), "wb");
203 if (output == NULL) 204 if (output == NULL)
204 { 205 {
205 cleanup(); 206 cleanup();
207 fclose(ids2);
206 emit logItem(tr("Error opening output file"),LOGERROR); 208 emit logItem(tr("Error opening output file"),LOGERROR);
207 emit done(true); 209 emit done(true);
208 return; 210 return;
209 } 211 }
210 212
211 voicefont(ids2,m_targetid,m_path.toLocal8Bit().data(), output); 213 voicefont(ids2,m_targetid,m_path.toLocal8Bit().data(), output);
214 // ids2 and output are closed by voicefont().
212 215
213 //cleanup 216 //cleanup
214 cleanup(); 217 cleanup();
@@ -216,7 +219,8 @@ void VoiceFileCreator::downloadDone(bool error)
216 // Add Voice file to the install log 219 // Add Voice file to the install log
217 QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0); 220 QSettings installlog(m_mountpoint + "/.rockbox/rbutil.log", QSettings::IniFormat, 0);
218 installlog.beginGroup("selfcreated Voice"); 221 installlog.beginGroup("selfcreated Voice");
219 installlog.setValue("/.rockbox/langs/" + m_lang + ".voice",QDate::currentDate().toString("yyyyMMdd")); 222 installlog.setValue("/.rockbox/langs/" + m_lang + ".voice",
223 QDate::currentDate().toString("yyyyMMdd"));
220 installlog.endGroup(); 224 installlog.endGroup();
221 installlog.sync(); 225 installlog.sync();
222 226