|
|
@ -41,6 +41,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include "base/global.h" |
|
|
|
#include "base/global.h" |
|
|
|
#include "base/utils/fs.h" |
|
|
|
#include "base/utils/fs.h" |
|
|
|
|
|
|
|
#include "base/utils/misc.h" |
|
|
|
#include "infohash.h" |
|
|
|
#include "infohash.h" |
|
|
|
#include "trackerentry.h" |
|
|
|
#include "trackerentry.h" |
|
|
|
|
|
|
|
|
|
|
@ -119,7 +120,7 @@ TorrentInfo TorrentInfo::loadFromFile(const QString &path, QString *error) noexc |
|
|
|
|
|
|
|
|
|
|
|
if (file.size() > MAX_TORRENT_SIZE) { |
|
|
|
if (file.size() > MAX_TORRENT_SIZE) { |
|
|
|
if (error) |
|
|
|
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(); |
|
|
|
return TorrentInfo(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|