Fixed possible crash on exit

Cleaned up main() function
This commit is contained in:
Christophe Dumez
2010-07-21 10:40:46 +00:00
parent 864bb8285e
commit 1e21ac3d79
3 changed files with 66 additions and 105 deletions

View File

@@ -1113,7 +1113,7 @@ QTorrentHandle Bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
//Getting fast resume data if existing
std::vector<char> buf;
if(resumed) {
const QString fastresume_path = torrentBackup.path()+QDir::separator()+hash+QString(".fastresume");
const QString fastresume_path = torrentBackup.absoluteFilePath(hash+QString(".fastresume"));
qDebug("Trying to load fastresume data: %s", qPrintable(fastresume_path));
if (load_file(fastresume_path.toLocal8Bit().constData(), buf) == 0) {
fastResume = true;