mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Use QFileInfo::exists where we are only creating a QFileInfo to check if file exists, as it is faster
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
7f6b18b232
commit
f6c4c32b6e
2 changed files with 5 additions and 5 deletions
|
@ -493,24 +493,24 @@ void User::slotProgressInfo(const QString &folder, const ProgressInfo &progress)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (activity._syncFileItemStatus == SyncFileItem::Conflict && !QFileInfo(f->path() + activity._file).exists()) {
|
||||
if (activity._syncFileItemStatus == SyncFileItem::Conflict && !QFileInfo::exists(f->path() + activity._file)) {
|
||||
_activityModel->removeActivityFromActivityList(activity);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (activity._syncFileItemStatus == SyncFileItem::FileLocked && !QFileInfo(f->path() + activity._file).exists()) {
|
||||
if (activity._syncFileItemStatus == SyncFileItem::FileLocked && !QFileInfo::exists(f->path() + activity._file)) {
|
||||
_activityModel->removeActivityFromActivityList(activity);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (activity._syncFileItemStatus == SyncFileItem::FileIgnored && !QFileInfo(f->path() + activity._file).exists()) {
|
||||
if (activity._syncFileItemStatus == SyncFileItem::FileIgnored && !QFileInfo::exists(f->path() + activity._file)) {
|
||||
_activityModel->removeActivityFromActivityList(activity);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (!QFileInfo(f->path() + activity._file).exists()) {
|
||||
if (!QFileInfo::exists(f->path() + activity._file)) {
|
||||
_activityModel->removeActivityFromActivityList(activity);
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -286,7 +286,7 @@ void SyncEngine::conflictRecordMaintenance()
|
|||
const auto conflictRecordPaths = _journal->conflictRecordPaths();
|
||||
for (const auto &path : conflictRecordPaths) {
|
||||
auto fsPath = _propagator->fullLocalPath(QString::fromUtf8(path));
|
||||
if (!QFileInfo(fsPath).exists()) {
|
||||
if (!QFileInfo::exists(fsPath)) {
|
||||
_journal->deleteConflictRecord(path);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue