Merge remote-tracking branch 'origin/master' into move_lib_to_sep_dir
Conflicts: src/CMakeLists.txt src/gui/accountsettings.cpp src/gui/folderwizard.cpp src/gui/settingsdialog.cpp src/libsync/syncengine.h
Esse commit está contido em:
@@ -19,6 +19,7 @@
|
||||
#include "owncloudpropagator.h"
|
||||
#include "syncjournaldb.h"
|
||||
#include "syncjournalfilerecord.h"
|
||||
#include "discoveryphase.h"
|
||||
#include "creds/abstractcredentials.h"
|
||||
#include "csync_util.h"
|
||||
|
||||
@@ -41,6 +42,7 @@
|
||||
#include <QUrl>
|
||||
#include <QSslCertificate>
|
||||
#include <QProcess>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
namespace Mirall {
|
||||
|
||||
@@ -263,7 +265,8 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
|
||||
item._file = fileUtf8;
|
||||
item._originalFile = item._file;
|
||||
|
||||
if (item._instruction == CSYNC_INSTRUCTION_NONE) {
|
||||
if (item._instruction == CSYNC_INSTRUCTION_NONE
|
||||
|| (item._instruction == CSYNC_INSTRUCTION_IGNORE && file->instruction != CSYNC_INSTRUCTION_NONE)) {
|
||||
item._instruction = file->instruction;
|
||||
item._modtime = file->modtime;
|
||||
} else {
|
||||
@@ -529,21 +532,27 @@ void SyncEngine::startSync()
|
||||
|
||||
_stopWatch.start();
|
||||
|
||||
qDebug() << "#### Update start #################################################### >>";
|
||||
qDebug() << "#### Discovery start #################################################### >>";
|
||||
|
||||
UpdateJob *job = new UpdateJob(_csync_ctx);
|
||||
DiscoveryJob *job = new DiscoveryJob(_csync_ctx);
|
||||
job->_selectiveSyncBlackList = _selectiveSyncWhiteList;
|
||||
job->moveToThread(&_thread);
|
||||
connect(job, SIGNAL(finished(int)), this, SLOT(slotUpdateFinished(int)));
|
||||
connect(job, SIGNAL(finished(int)), this, SLOT(slotDiscoveryJobFinished(int)));
|
||||
connect(job, SIGNAL(folderDiscovered(bool,QString)),
|
||||
this, SIGNAL(folderDiscovered(bool,QString)));
|
||||
QMetaObject::invokeMethod(job, "start", Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
void SyncEngine::slotUpdateFinished(int updateResult)
|
||||
void SyncEngine::slotDiscoveryJobFinished(int discoveryResult)
|
||||
{
|
||||
if (updateResult < 0 ) {
|
||||
// To clean the progress info
|
||||
emit folderDiscovered(false, QString());
|
||||
|
||||
if (discoveryResult < 0 ) {
|
||||
handleSyncError(_csync_ctx, "csync_update");
|
||||
return;
|
||||
}
|
||||
qDebug() << "<<#### Update end #################################################### " << _stopWatch.addLapTime(QLatin1String("Update Finished"));
|
||||
qDebug() << "<<#### Discovery end #################################################### " << _stopWatch.addLapTime(QLatin1String("Discovery Finished"));
|
||||
|
||||
if( csync_reconcile(_csync_ctx) < 0 ) {
|
||||
handleSyncError(_csync_ctx, "csync_reconcile");
|
||||
@@ -622,6 +631,10 @@ void SyncEngine::slotUpdateFinished(int updateResult)
|
||||
QProcess::execute(script.toUtf8());
|
||||
}
|
||||
#endif
|
||||
|
||||
// do a database commit
|
||||
_journal->commit("post treewalk");
|
||||
|
||||
_propagator.reset(new OwncloudPropagator (session, _localPath, _remoteUrl, _remotePath,
|
||||
_journal, &_thread));
|
||||
connect(_propagator.data(), SIGNAL(completed(SyncFileItem)),
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário