mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 21:15:55 +03:00
Remove the mutex from ExcludedFiles
It's always accessed from the main thread.
This commit is contained in:
parent
2d2c7bc9b8
commit
a4e0899af4
2 changed files with 0 additions and 7 deletions
|
@ -14,8 +14,6 @@
|
|||
#include "excludedfiles.h"
|
||||
|
||||
#include <QFileInfo>
|
||||
#include <QReadLocker>
|
||||
#include <QWriteLocker>
|
||||
|
||||
extern "C" {
|
||||
#include "std/c_string.h"
|
||||
|
@ -44,13 +42,11 @@ ExcludedFiles& ExcludedFiles::instance()
|
|||
|
||||
void ExcludedFiles::addExcludeFilePath(const QString& path)
|
||||
{
|
||||
QWriteLocker locker(&_mutex);
|
||||
_excludeFiles.append(path);
|
||||
}
|
||||
|
||||
bool ExcludedFiles::reloadExcludes()
|
||||
{
|
||||
QWriteLocker locker(&_mutex);
|
||||
c_strlist_destroy(*_excludesPtr);
|
||||
*_excludesPtr = NULL;
|
||||
|
||||
|
@ -89,6 +85,5 @@ bool ExcludedFiles::isExcluded(
|
|||
relativePath.chop(1);
|
||||
}
|
||||
|
||||
QReadLocker lock(&_mutex);
|
||||
return csync_excluded_no_ctx(*_excludesPtr, relativePath.toUtf8(), type) != CSYNC_NOT_EXCLUDED;
|
||||
}
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "owncloudlib.h"
|
||||
|
||||
#include <QObject>
|
||||
#include <QReadWriteLock>
|
||||
#include <QStringList>
|
||||
|
||||
extern "C" {
|
||||
|
@ -68,7 +67,6 @@ private:
|
|||
// but the pointer can be in a csync_context so that it can itself also query the list.
|
||||
c_strlist_t** _excludesPtr;
|
||||
QStringList _excludeFiles;
|
||||
mutable QReadWriteLock _mutex;
|
||||
};
|
||||
|
||||
} // namespace OCC
|
||||
|
|
Loading…
Reference in a new issue