mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
SyncEngine: allow to do a post upgrade script in debug mode.
This commit is contained in:
parent
4dfe0fad7d
commit
0f4cf74ae0
@ -39,6 +39,7 @@
|
||||
#include <QTime>
|
||||
#include <QUrl>
|
||||
#include <QSslCertificate>
|
||||
#include <QProcess>
|
||||
|
||||
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)),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user