last step

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
This commit is contained in:
Matthieu Gallien 2023-07-27 10:49:04 +02:00 committed by Matthieu Gallien
parent 70931fb0af
commit e3456847d8
9 changed files with 15 additions and 15 deletions

View file

@ -676,7 +676,7 @@ QString Utility::makeCaseClashConflictFileName(const QString &filename, const QD
bool Utility::isCaseClashConflictFile(const QString &name)
{
const auto bname = name.midRef(name.lastIndexOf(QLatin1Char('/')) + 1);
const auto bname = name.mid(name.lastIndexOf(QLatin1Char('/')) + 1);
return bname.contains(QStringLiteral("(case clash from"));
}

View file

@ -99,7 +99,6 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString &guiName,
const QString executablePath = runningInsideAppImage ? appImagePath : QCoreApplication::applicationFilePath();
QTextStream ts(&iniFile);
ts.setCodec("UTF-8");
ts << QLatin1String("[Desktop Entry]\n")
<< QLatin1String("Name=") << guiName << QLatin1Char('\n')
<< QLatin1String("GenericName=") << QLatin1String("File Synchronizer\n")

View file

@ -33,6 +33,7 @@ namespace {
static const auto placeholderLinkShareId = QStringLiteral("__placeholderLinkShareId__");
static const auto internalLinkShareId = QStringLiteral("__internalLinkShareId__");
static const auto secureFileDropPlaceholderLinkShareId = QStringLiteral("__secureFileDropPlaceholderLinkShareId__");
}
namespace OCC

View file

@ -567,12 +567,11 @@ void Folder::slotWatchedPathChanged(const QStringView &path, const ChangeReason
auto relativePath = path.mid(this->path().size());
if (_vfs) {
if (pathIsIgnored(path)) {
if (pathIsIgnored(path.toString())) {
const auto pinState = _vfs->pinState(relativePath.toString());
if (!pinState || *pinState != PinState::Excluded) {
if (!_vfs->setPinState(relativePath.toString(), PinState::Excluded)) {
qCWarning(lcFolder) << "Could not set pin state of" << relativePath << "to excluded";
}
}
return;
} else {
@ -1713,8 +1712,8 @@ void Folder::removeLocalE2eFiles()
const auto existingBlacklist = _journal.getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
Q_ASSERT(ok);
const auto existingBlacklistSet = existingBlacklist.toSet();
auto expandedBlacklistSet = existingBlacklist.toSet();
const auto existingBlacklistSet = QSet<QString>{existingBlacklist.begin(), existingBlacklist.end()};
auto expandedBlacklistSet = QSet<QString>{existingBlacklist.begin(), existingBlacklist.end()};
for (const auto &path : qAsConst(e2eFoldersToBlacklist)) {
expandedBlacklistSet.insert(path);

View file

@ -14,7 +14,7 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
import QtGraphicalEffects 1.0
import Qt5Compat.GraphicalEffects
import Style 1.0
HeaderButton {

View file

@ -452,13 +452,15 @@ void ProcessDirectoryJob::checkAndUpdateSelectiveSyncListsForE2eeFolders(const Q
const auto pathWithTrailingSpace = Utility::trailingSlashPath(path);
auto blackListSet = _discoveryData->_statedb->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok).toSet();
const auto blackListList = _discoveryData->_statedb->getSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, &ok);
auto blackListSet = QSet<QString>{blackListList.begin(), blackListList.end()};
blackListSet.insert(pathWithTrailingSpace);
auto blackList = blackListSet.values();
blackList.sort();
_discoveryData->_statedb->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList, blackList);
auto toRemoveFromBlacklistSet = _discoveryData->_statedb->getSelectiveSyncList(SyncJournalDb::SelectiveSyncE2eFoldersToRemoveFromBlacklist, &ok).toSet();
const auto toRemoveFromBlacklistList = _discoveryData->_statedb->getSelectiveSyncList(SyncJournalDb::SelectiveSyncE2eFoldersToRemoveFromBlacklist, &ok);
auto toRemoveFromBlacklistSet = QSet<QString>{toRemoveFromBlacklistList.begin(), toRemoveFromBlacklistList.end()};
toRemoveFromBlacklistSet.insert(pathWithTrailingSpace);
// record it into a separate list to automatically remove from blacklist once the e2EE gets set up
auto toRemoveFromBlacklist = toRemoveFromBlacklistSet.values();

View file

@ -359,7 +359,6 @@ void Logger::setLogFileNoLock(const QString &name)
}
_logstream.reset(new QTextStream(&_logFile));
_logstream->setCodec(QTextCodec::codecForName("UTF-8"));
}
void Logger::enterNextLogFile()

View file

@ -16,14 +16,14 @@
#ifndef NETWORKJOBS_H
#define NETWORKJOBS_H
#include <QBuffer>
#include "abstractnetworkjob.h"
#include "common/result.h"
#include <QBuffer>
#include <QUrlQuery>
class QUrl;
class QUrlQuery;
class QJsonObject;
class QJsonDocument;
class QDomDocument;

View file

@ -1217,10 +1217,10 @@ void PropagateDownloadFile::downloadFinished()
}
if (_item->_locked == SyncFileItem::LockStatus::LockedItem && (_item->_lockOwnerType != SyncFileItem::LockOwnerType::UserLock || _item->_lockOwnerId != propagator()->account()->davUser())) {
qCDebug(lcPropagateDownload()) << _tmpFile << "file is locked: making it read only";
qCDebug(lcPropagateDownload()) << _tmpFile.fileName() << "file is locked: making it read only";
FileSystem::setFileReadOnly(_tmpFile.fileName(), true);
} else {
qCDebug(lcPropagateDownload()) << _tmpFile << "file is not locked: making it"
qCDebug(lcPropagateDownload()) << _tmpFile.fileName() << "file is not locked: making it"
<< ((!_item->_remotePerm.isNull() && !_item->_remotePerm.hasPermission(RemotePermissions::CanWrite)) ? "read only"
: "read write");
FileSystem::setFileReadOnlyWeak(_tmpFile.fileName(), (!_item->_remotePerm.isNull() && !_item->_remotePerm.hasPermission(RemotePermissions::CanWrite)));