1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Show user friendly size in error

This commit is contained in:
thalieht 2019-04-08 20:12:52 +03:00
parent 25102b9c5d
commit 2f3b7642c2

View File

@ -41,6 +41,7 @@
#include "base/global.h"
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "infohash.h"
#include "trackerentry.h"
@ -119,7 +120,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();
}