diff --git a/src/libsync/clientsideencryption.cpp b/src/libsync/clientsideencryption.cpp index 118a6084c2..0c07ec8b11 100644 --- a/src/libsync/clientsideencryption.cpp +++ b/src/libsync/clientsideencryption.cpp @@ -1279,9 +1279,9 @@ QVector FolderMetadata::files() const { return _files; } -bool ClientSideEncryption::isFolderEncrypted(const QString& path) { - auto it = _folder2encryptedStatus.find(path); - if (it == _folder2encryptedStatus.end()) +bool ClientSideEncryption::isFolderEncrypted(const QString& path) const { + auto it = _folder2encryptedStatus.constFind(path); + if (it == _folder2encryptedStatus.constEnd()) return false; return (*it); } diff --git a/src/libsync/clientsideencryption.h b/src/libsync/clientsideencryption.h index 7d5810a8da..b5ffab5dcd 100644 --- a/src/libsync/clientsideencryption.h +++ b/src/libsync/clientsideencryption.h @@ -81,7 +81,7 @@ public: void fetchFolderEncryptedStatus(); // to be used together with FolderStatusModel::FolderInfo::_path. - bool isFolderEncrypted(const QString& path); + bool isFolderEncrypted(const QString& path) const; void setFolderEncryptedStatus(const QString& path, bool status); void forgetSensitiveData();