Show user friendly size in error

This commit is contained in:
thalieht 2019-04-08 20:12:52 +03:00
commit 7b006a47ba

View file

@ -108,7 +108,7 @@ TorrentInfo TorrentInfo::loadFromFile(const QString &path, QString *error) noexc
if (file.size() > MAX_TORRENT_SIZE) {
if (error)
*error = tr("File size exceeds max limit %1").arg(MAX_TORRENT_SIZE);
*error = tr("File size exceeds max limit %1").arg(Utils::Misc::friendlyUnit(MAX_TORRENT_SIZE));
return TorrentInfo();
}