mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-12 07:48:04 +00:00
Qt 4.6 fix
This commit is contained in:
parent
5451bb185e
commit
ce0ddbe517
@ -1556,15 +1556,17 @@ void Bittorrent::addConsoleMessage(QString msg, QString) {
|
|||||||
if(file_size > 0 && (fp[i]/(double)file_size) < 1.) {
|
if(file_size > 0 && (fp[i]/(double)file_size) < 1.) {
|
||||||
const QString &name = misc::toQString(h.get_torrent_info().file_at(i).path.string());
|
const QString &name = misc::toQString(h.get_torrent_info().file_at(i).path.string());
|
||||||
if(!name.endsWith(".!qB")) {
|
if(!name.endsWith(".!qB")) {
|
||||||
qDebug("Renaming %s to %s", qPrintable(name), qPrintable(name+".!qB"));
|
const QString &new_name = name+".!qB";
|
||||||
h.rename_file(i, name + ".!qB");
|
qDebug("Renaming %s to %s", qPrintable(name), qPrintable(new_name));
|
||||||
|
h.rename_file(i, new_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
QString name = misc::toQString(h.get_torrent_info().file_at(i).path.string());
|
QString name = misc::toQString(h.get_torrent_info().file_at(i).path.string());
|
||||||
if(name.endsWith(".!qB")) {
|
if(name.endsWith(".!qB")) {
|
||||||
|
const QString old_name = name;
|
||||||
name.chop(4);
|
name.chop(4);
|
||||||
qDebug("Renaming %s to %s", qPrintable(name+".!qB"), qPrintable(name));
|
qDebug("Renaming %s to %s", qPrintable(old_name), qPrintable(name));
|
||||||
h.rename_file(i, name);
|
h.rename_file(i, name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user