mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2025-04-28 01:15:46 +02:00
Race condition in the remote size loading logic
The quota retrieval process might not be finished by the time the used space on the server (`_rSize`) is compared against the locally available disk space which might end up in a "There isn't enough free space in the local folder!" message even if there is enough free space. This patch updates the status after the quota has been retrieved. It also initializes `_rSize` to `-1` so that errors like this are easier to catch in the future.
This commit is contained in:
parent
caa7c845c2
commit
a0faf1f54d
@ -42,6 +42,8 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
|
||||
, _localFolderValid(false)
|
||||
, _progressIndi(new QProgressIndicator(this))
|
||||
, _remoteFolder()
|
||||
, _rSize(-1)
|
||||
, _rSelectedSize(-1)
|
||||
{
|
||||
_ui.setupUi(this);
|
||||
|
||||
@ -368,6 +370,8 @@ void OwncloudAdvancedSetupPage::slotQuotaRetrieved(const QVariantMap &result)
|
||||
{
|
||||
_rSize = result["size"].toDouble();
|
||||
_ui.lSyncEverythingSizeLabel->setText(tr("(%1)").arg(Utility::octetsToString(_rSize)));
|
||||
|
||||
updateStatus();
|
||||
}
|
||||
|
||||
qint64 OwncloudAdvancedSetupPage::availableLocalSpace() const
|
||||
|
Loading…
Reference in New Issue
Block a user