mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 04:55:48 +03:00
Merge pull request #3586 from nextcloud/bugfix/fix-crash-folder-isSyncRunning
Fix crash in Folder::isSyncRunning()
This commit is contained in:
commit
1e91e1bd96
2 changed files with 7 additions and 1 deletions
|
@ -252,7 +252,7 @@ bool Folder::isBusy() const
|
||||||
|
|
||||||
bool Folder::isSyncRunning() const
|
bool Folder::isSyncRunning() const
|
||||||
{
|
{
|
||||||
return _engine->isSyncRunning() || _vfs->isHydrating();
|
return _engine->isSyncRunning() || (_vfs && _vfs->isHydrating());
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Folder::remotePath() const
|
QString Folder::remotePath() const
|
||||||
|
|
|
@ -57,6 +57,12 @@ private slots:
|
||||||
QVERIFY(folderman->addFolder(newAccountState.data(), folderDefinition(dirPath + "/sub/ownCloud1")));
|
QVERIFY(folderman->addFolder(newAccountState.data(), folderDefinition(dirPath + "/sub/ownCloud1")));
|
||||||
QVERIFY(folderman->addFolder(newAccountState.data(), folderDefinition(dirPath + "/ownCloud2")));
|
QVERIFY(folderman->addFolder(newAccountState.data(), folderDefinition(dirPath + "/ownCloud2")));
|
||||||
|
|
||||||
|
const auto folderList = folderman->map();
|
||||||
|
|
||||||
|
for (const auto &folder : folderList) {
|
||||||
|
QVERIFY(!folder->isSyncRunning());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// those should be allowed
|
// those should be allowed
|
||||||
// QString FolderMan::checkPathValidityForNewFolder(const QString& path, const QUrl &serverUrl, bool forNewDirectory)
|
// QString FolderMan::checkPathValidityForNewFolder(const QString& path, const QUrl &serverUrl, bool forNewDirectory)
|
||||||
|
|
Loading…
Reference in a new issue