mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
Fix emptying of piece size combobox when user checks "auto" checkbox.
The function computePathSize returns -1 if file isn't found, not 0.
This commit is contained in:
@@ -220,9 +220,9 @@ void TorrentCreatorDlg::on_checkAutoPieceSize_clicked(bool checked)
|
|||||||
|
|
||||||
void TorrentCreatorDlg::updateOptimalPieceSize()
|
void TorrentCreatorDlg::updateOptimalPieceSize()
|
||||||
{
|
{
|
||||||
quint64 torrent_size = fsutils::computePathSize(textInputPath->text());
|
qint64 torrent_size = fsutils::computePathSize(textInputPath->text());
|
||||||
qDebug("Torrent size is %lld", torrent_size);
|
qDebug("Torrent size is %lld", torrent_size);
|
||||||
if (torrent_size == 0) return;
|
if (torrent_size < 0) return;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
qulonglong nb_pieces = 0;
|
qulonglong nb_pieces = 0;
|
||||||
do {
|
do {
|
||||||
|
|||||||
Reference in New Issue
Block a user