From 0f4cf74ae0cf4448331e1bb681d73e62f82dd78d Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 22 Jul 2014 18:07:02 +0200 Subject: [PATCH] SyncEngine: allow to do a post upgrade script in debug mode. --- src/mirall/syncengine.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp index 8d664f9370..cad4ce7c3f 100644 --- a/src/mirall/syncengine.cpp +++ b/src/mirall/syncengine.cpp @@ -39,6 +39,7 @@ #include #include #include +#include namespace Mirall { @@ -584,6 +585,15 @@ void SyncEngine::slotUpdateFinished(int updateResult) csync_set_module_property(_csync_ctx, "get_dav_session", &session); Q_ASSERT(session); + // post update phase script: allow to tweak stuff by a custom script in debug mode. +#ifndef NDEBUG + if( !qgetenv("OWNCLOUD_POST_UPDATE_SCRIPT").isEmpty() ) { + QString script = qgetenv("OWNCLOUD_POST_UPDATE_SCRIPT"); + + qDebug() << "OOO => Post Update Script: " << script; + QProcess::execute(script.toUtf8()); + } +#endif _propagator.reset(new OwncloudPropagator (session, _localPath, _remoteUrl, _remotePath, _journal, &_thread)); connect(_propagator.data(), SIGNAL(completed(SyncFileItem)),