mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 09:30:13 +03:00
Merge pull request #5291 from nextcloud/bugfix/qfileinfo-exists
Use QFileInfo::exists where we are only creating a QFileInfo to check if file exists
This commit is contained in:
commit
cdc58c3053
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