Browse Source

Merge pull request #4733 from glassez/fix

Fix upgrade corrupted fastresume file
adaptive-webui-19844
sledgehammer999 9 years ago
parent
commit
232af6b802
  1. 2
      src/app/upgrade.h

2
src/app/upgrade.h

@ -88,7 +88,7 @@ bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent,
libtorrent::lazy_entry fastOld; libtorrent::lazy_entry fastOld;
libtorrent::error_code ec; libtorrent::error_code ec;
libtorrent::lazy_bdecode(data.constData(), data.constData() + data.size(), fastOld, ec); libtorrent::lazy_bdecode(data.constData(), data.constData() + data.size(), fastOld, ec);
if ((fastOld.type() != libtorrent::lazy_entry::dict_t) && !ec) return false; if (ec || (fastOld.type() != libtorrent::lazy_entry::dict_t)) return false;
libtorrent::entry fastNew; libtorrent::entry fastNew;
fastNew = fastOld; fastNew = fastOld;

Loading…
Cancel
Save