mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 13:35:58 +03:00
Merge remote-tracking branch 'origin/il'
This commit is contained in:
commit
94ddf7e5d8
4 changed files with 14 additions and 11 deletions
|
@ -45,7 +45,7 @@ void PropagateItemJob::done(SyncFileItem::Status status, const QString &errorStr
|
|||
{
|
||||
if (_item._isRestoration) {
|
||||
if( status == SyncFileItem::Success || status == SyncFileItem::Conflict) {
|
||||
status = SyncFileItem::SoftError;
|
||||
status = SyncFileItem::Restoration;
|
||||
} else {
|
||||
_item._errorString += tr("; Restoration Failed: ") + errorString;
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ void PropagateItemJob::done(SyncFileItem::Status status, const QString &errorStr
|
|||
_propagator->_journal->updateBlacklistEntry( record );
|
||||
break;
|
||||
case SyncFileItem::Success:
|
||||
case SyncFileItem::Restoration:
|
||||
if( _item._blacklistedInDb ) {
|
||||
// wipe blacklist entry.
|
||||
_propagator->_journal->wipeBlacklistEntry(_item._file);
|
||||
|
@ -161,7 +162,8 @@ void PropagateItemJob::slotRestoreJobCompleted(const SyncFileItem& item )
|
|||
_restoreJob->setRestoreJobMsg();
|
||||
}
|
||||
|
||||
if( item._status == SyncFileItem::Success || item._status == SyncFileItem::Conflict) {
|
||||
if( item._status == SyncFileItem::Success || item._status == SyncFileItem::Conflict
|
||||
|| item._status == SyncFileItem::Restoration) {
|
||||
done( SyncFileItem::SoftError, msg);
|
||||
} else {
|
||||
done( item._status, tr("A file or directory was removed from a read only share, but restoring failed: %1").arg(item._errorString) );
|
||||
|
@ -388,7 +390,8 @@ void PropagateDirectory::start()
|
|||
|
||||
void PropagateDirectory::slotSubJobFinished(SyncFileItem::Status status)
|
||||
{
|
||||
if (status == SyncFileItem::FatalError || (_current == -1 && status != SyncFileItem::Success)) {
|
||||
if (status == SyncFileItem::FatalError ||
|
||||
(_current == -1 && status != SyncFileItem::Success && status != SyncFileItem::Restoration)) {
|
||||
abort();
|
||||
emit finished(status);
|
||||
return;
|
||||
|
|
|
@ -84,7 +84,7 @@ bool Progress::isWarningKind( SyncFileItem::Status kind)
|
|||
{
|
||||
return kind == SyncFileItem::SoftError || kind == SyncFileItem::NormalError
|
||||
|| kind == SyncFileItem::FatalError || kind == SyncFileItem::FileIgnored
|
||||
|| kind == SyncFileItem::Conflict;
|
||||
|| kind == SyncFileItem::Conflict || kind == SyncFileItem::Restoration;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -273,13 +273,17 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
|
|||
if (file->directDownloadCookies) {
|
||||
item._directDownloadCookies = QString::fromUtf8( file->directDownloadCookies );
|
||||
}
|
||||
if (file->remotePerm) {
|
||||
if (file->remotePerm && file->remotePerm[0]) {
|
||||
item._remotePerm = QByteArray(file->remotePerm);
|
||||
}
|
||||
|
||||
// record the seen files to be able to clean the journal later
|
||||
_seenFiles.insert(item._file);
|
||||
|
||||
if (remote && file->remotePerm && file->remotePerm[0]) {
|
||||
_remotePerms[item._file] = file->remotePerm;
|
||||
}
|
||||
|
||||
switch(file->error_status) {
|
||||
case CSYNC_STATUS_OK:
|
||||
break;
|
||||
|
@ -399,10 +403,6 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
|
|||
|
||||
_syncedItems.append(item);
|
||||
|
||||
if (remote && file->remotePerm) {
|
||||
_remotePerms[item._file] = file->remotePerm;
|
||||
}
|
||||
|
||||
emit syncItemDiscovered(item);
|
||||
return re;
|
||||
}
|
||||
|
@ -880,7 +880,6 @@ void SyncEngine::checkForPermission()
|
|||
|
||||
QByteArray SyncEngine::getPermissions(const QString& file) const
|
||||
{
|
||||
//FIXME;
|
||||
static bool isTest = qgetenv("OWNCLOUD_TEST_PERMISSIONS").toInt();
|
||||
if (isTest) {
|
||||
QRegExp rx("_PERM_([^_]*)_[^/]*$");
|
||||
|
|
|
@ -46,7 +46,8 @@ public:
|
|||
|
||||
Success, ///< The file was properly synced
|
||||
Conflict, ///< The file was properly synced, but a conflict was created
|
||||
FileIgnored ///< The file is in the ignored list
|
||||
FileIgnored, ///< The file is in the ignored list
|
||||
Restoration ///< The file was restored because what should have been done was not allowed
|
||||
};
|
||||
|
||||
SyncFileItem() : _type(UnknownType), _direction(None), _isDirectory(false),
|
||||
|
|
Loading…
Reference in a new issue