Browse Source

Log file rename failed errors

adaptive-webui-19844
Chocobo1 6 years ago
parent
commit
8191f1498a
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 7
      src/base/bittorrent/torrenthandle.cpp

7
src/base/bittorrent/torrenthandle.cpp

@ -1479,10 +1479,9 @@ void TorrentHandle::moveStorage(const QString &newPath, bool overwrite) @@ -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 @@ -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…
Cancel
Save