Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-04-29 15:40:21 +0300
committerHannah von Reth <hannah.vonreth@owncloud.com>2022-04-29 15:40:21 +0300
commite27b973ecbd83ef910af9b0251781cb0f4006782 (patch)
treeeb925bf80a872f52e87b56c3193fb72eea29a199 /src/gui/folder.cpp
parent1a1b9fe27871eef12add7f1ffab511b263e83c7c (diff)
parentca7f788b1ca68ad3ea8062c3f3e537793df89b93 (diff)
Merge remote-tracking branch 'origin/2.10'
Diffstat (limited to 'src/gui/folder.cpp')
-rw-r--r--src/gui/folder.cpp23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp
index 148399879..6f34cee2c 100644
--- a/src/gui/folder.cpp
+++ b/src/gui/folder.cpp
@@ -629,6 +629,7 @@ int Folder::slotWipeErrorBlacklist()
void Folder::slotWatchedPathChanged(const QString &path, ChangeReason reason)
{
+ Q_ASSERT(isReady());
if (!FileSystem::isChildPathOf(path, this->path())) {
qCDebug(lcFolder) << "Changed path is not contained in folder, ignoring:" << path;
return;
@@ -839,22 +840,25 @@ void Folder::removeFromSettings() const
bool Folder::isFileExcludedAbsolute(const QString &fullPath) const
{
+ if (!_engine) {
+ return true;
+ }
return _engine->excludedFiles().isExcluded(fullPath, path(), _definition.ignoreHiddenFiles);
}
bool Folder::isFileExcludedRelative(const QString &relativePath) const
{
- return _engine->excludedFiles().isExcluded(path() + relativePath, path(), _definition.ignoreHiddenFiles);
+ return isFileExcludedAbsolute(path() + relativePath);
}
void Folder::slotTerminateSync()
{
- qCInfo(lcFolder) << "folder " << path() << " Terminating!";
-
- if (_engine->isSyncRunning()) {
- _engine->abort();
-
- setSyncState(SyncResult::SyncAbortRequested);
+ if (isReady()) {
+ qCInfo(lcFolder) << "folder " << path() << " Terminating!";
+ if (_engine->isSyncRunning()) {
+ _engine->abort();
+ setSyncState(SyncResult::SyncAbortRequested);
+ }
}
}
@@ -905,6 +909,9 @@ void Folder::wipeForRemoval()
bool Folder::reloadExcludes()
{
+ if (!_engine) {
+ return true;
+ }
return _engine->excludedFiles().reloadExcludeFiles();
}
@@ -970,6 +977,7 @@ void Folder::startSync()
void Folder::setDirtyNetworkLimits()
{
+ Q_ASSERT(isReady());
ConfigFile cfg;
int downloadLimit = -75; // 75%
int useDownLimit = cfg.useDownloadLimit();
@@ -1005,6 +1013,7 @@ void Folder::slotSyncStarted()
void Folder::slotSyncFinished(bool success)
{
+ Q_ASSERT(isReady());
qCInfo(lcFolder) << "Client version" << Theme::instance()->aboutVersions(Theme::VersionFormat::OneLiner);
bool syncError = !_syncResult.errorStrings().isEmpty();