mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-11 07:18:08 +00:00
Log file rename failed errors
This commit is contained in:
parent
eabcae1018
commit
8191f1498a
@ -1479,10 +1479,9 @@ void TorrentHandle::moveStorage(const QString &newPath, bool overwrite)
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentHandle::renameFile(int index, const QString &name)
|
||||
void TorrentHandle::renameFile(const int index, const QString &name)
|
||||
{
|
||||
++m_renameCount;
|
||||
qDebug() << Q_FUNC_INFO << index << name;
|
||||
m_nativeHandle.rename_file(index, Utils::Fs::toNativePath(name).toStdString());
|
||||
}
|
||||
|
||||
@ -1777,6 +1776,10 @@ void TorrentHandle::handleFileRenameFailedAlert(const lt::file_rename_failed_ale
|
||||
{
|
||||
Q_UNUSED(p);
|
||||
|
||||
LogMsg(tr("File rename failed. Torrent: \"%1\", file: \"%2\", reason: \"%3\"")
|
||||
.arg(name(), filePath(p->index)
|
||||
, QString::fromStdString(p->error.message())), Log::WARNING);
|
||||
|
||||
--m_renameCount;
|
||||
while (!isMoveInProgress() && (m_renameCount == 0) && !m_moveFinishedTriggers.isEmpty())
|
||||
m_moveFinishedTriggers.takeFirst()();
|
||||
|
Loading…
Reference in New Issue
Block a user