mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Bugfix. Folder invalid char conflict. Do not update parent folder record if it contains conflicted subfolders.
Signed-off-by: alex-z <blackslayer4@gmail.com>
This commit is contained in:
parent
d240ed9d50
commit
d2bfb59d6a
@ -404,6 +404,11 @@ bool ProcessDirectoryJob::handleExcluded(const QString &path, const Entries &ent
|
||||
}
|
||||
}
|
||||
|
||||
if (item->_status == SyncFileItem::FileNameInvalid && !item->isDirectory()) {
|
||||
_dirItem->_isAnyInvalidCharChild = true;
|
||||
}
|
||||
|
||||
|
||||
_childIgnored = true;
|
||||
emit _discoveryData->itemDiscovered(item);
|
||||
return true;
|
||||
|
||||
@ -1291,11 +1291,15 @@ void PropagatorCompositeJob::slotSubJobFinished(SyncFileItem::Status status)
|
||||
auto *subJob = dynamic_cast<PropagatorJob *>(sender());
|
||||
ASSERT(subJob);
|
||||
|
||||
if (!_isAnyCaseClashSubFolder) {
|
||||
if (!_isAnyChildInConflict) {
|
||||
if (const auto propagateDirectoryjob = qobject_cast<PropagateDirectory *>(subJob)) {
|
||||
_isAnyCaseClashSubFolder = propagateDirectoryjob->_item && propagateDirectoryjob->_item->_isCaseClashFolder;
|
||||
_isAnyChildInConflict = propagateDirectoryjob->_item && propagateDirectoryjob->_item->_status == SyncFileItem::FileNameClash;
|
||||
} else if (const auto propagateIgnoreJob = qobject_cast<PropagateIgnoreJob *>(subJob)) {
|
||||
_isAnyChildInConflict =
|
||||
propagateIgnoreJob->_item && propagateIgnoreJob->_item->_status == SyncFileItem::FileNameInvalid;
|
||||
}
|
||||
}
|
||||
|
||||
// Delete the job and remove it from our list of jobs.
|
||||
subJob->deleteLater();
|
||||
int i = _runningJobs.indexOf(subJob);
|
||||
@ -1501,7 +1505,7 @@ void PropagateDirectory::slotSubJobsFinished(SyncFileItem::Status status)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!_subJobs._isAnyCaseClashSubFolder) {
|
||||
if (!_subJobs._isAnyChildInConflict) {
|
||||
const auto result = propagator()->updateMetadata(*_item);
|
||||
if (!result) {
|
||||
status = _item->_status = SyncFileItem::FatalError;
|
||||
|
||||
@ -246,7 +246,7 @@ public:
|
||||
QVector<PropagatorJob *> _runningJobs;
|
||||
SyncFileItem::Status _hasError = SyncFileItem::NoStatus; // NoStatus, or NormalError / SoftError if there was an error
|
||||
quint64 _abortsCount = 0;
|
||||
bool _isAnyCaseClashSubFolder = false;
|
||||
bool _isAnyChildInConflict = false;
|
||||
|
||||
explicit PropagatorCompositeJob(OwncloudPropagator *propagator)
|
||||
: PropagatorJob(propagator)
|
||||
|
||||
@ -337,6 +337,8 @@ public:
|
||||
bool _isEncryptedMetadataNeedUpdate = false;
|
||||
|
||||
bool _isCaseClashFolder = false;
|
||||
|
||||
bool _isAnyInvalidCharChild = false;
|
||||
};
|
||||
|
||||
inline bool operator<(const SyncFileItemPtr &item1, const SyncFileItemPtr &item2)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user