mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
Merge branch '1.5'
Conflicts: src/owncloudcmd/owncloudcmd.cpp
This commit is contained in:
commit
8e6674e784
2 changed files with 10 additions and 14 deletions
|
@ -480,13 +480,13 @@ static int dav_connect(const char *base_url) {
|
|||
DEBUG_WEBDAV("* port %u", port );
|
||||
DEBUG_WEBDAV("* path %s", path );
|
||||
|
||||
if( strcmp( scheme, "owncloud" ) == 0 ) {
|
||||
if( strcmp( scheme, "owncloud" ) == 0 || strcmp( scheme, "http" ) == 0 ) {
|
||||
strcpy( protocol, "http");
|
||||
} else if( strcmp( scheme, "ownclouds" ) == 0 ) {
|
||||
} else if( strcmp( scheme, "ownclouds" ) == 0 || strcmp( scheme, "https") == 0 ) {
|
||||
strcpy( protocol, "https");
|
||||
useSSL = 1;
|
||||
} else {
|
||||
DEBUG_WEBDAV("Invalid scheme %s, go outa here!", scheme );
|
||||
DEBUG_WEBDAV("Invalid scheme %s, go out here!", scheme );
|
||||
rc = -1;
|
||||
goto out;
|
||||
}
|
||||
|
@ -497,15 +497,6 @@ static int dav_connect(const char *base_url) {
|
|||
port = ne_uri_defaultport(protocol);
|
||||
}
|
||||
|
||||
#if 0
|
||||
rc = ne_sock_init();
|
||||
DEBUG_WEBDAV("ne_sock_init: %d", rc );
|
||||
if (rc < 0) {
|
||||
rc = -1;
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
dav_session.ctx = ne_session_create( protocol, host, port);
|
||||
|
||||
if (dav_session.ctx == NULL) {
|
||||
|
@ -898,7 +889,10 @@ csync_vio_handle_t *owncloud_opendir(const char *uri) {
|
|||
|
||||
DEBUG_WEBDAV("opendir method called on %s", uri );
|
||||
|
||||
dav_connect( uri );
|
||||
if (dav_connect( uri ) < 0) {
|
||||
DEBUG_WEBDAV("connection failed");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
curi = _cleanPath( uri );
|
||||
if (is_first_propfind && !dav_session.no_recursive_propfind) {
|
||||
|
|
|
@ -212,7 +212,9 @@ int main(int argc, char **argv) {
|
|||
SyncEngine engine(_csync_ctx, options.source_dir, QUrl(options.target_url).path(), folder, &db);
|
||||
QObject::connect(&engine, SIGNAL(finished()), &app, SLOT(quit()));
|
||||
QObject::connect(&engine, SIGNAL(transmissionProgress(Progress::Info)), &owncloudCmd, SLOT(transmissionProgressSlot()));
|
||||
engine.startSync();
|
||||
|
||||
// Have to be done async, else, an error before exec() does not terminate the event loop.
|
||||
QMetaObject::invokeMethod(&engine, "startSync", Qt::QueuedConnection);
|
||||
|
||||
app.exec();
|
||||
|
||||
|
|
Loading…
Reference in a new issue