Merge lp:~lukas-baubkus/owncloud-sync/feature-keep-serverUrl-port-for-webdav into lp:~ocs-team/owncloud-sync/UBsync

Proposed by Luksus on 2019-02-12
Status: Needs review
Proposed branch: lp:~lukas-baubkus/owncloud-sync/feature-keep-serverUrl-port-for-webdav
Merge into: lp:~ocs-team/owncloud-sync/UBsync
Diff against target: 23 lines (+5/-1)
1 file modified
OwncloudSync/webdavfolderlistmodel.cpp (+5/-1)
To merge this branch: bzr merge lp:~lukas-baubkus/owncloud-sync/feature-keep-serverUrl-port-for-webdav
Reviewer Review Type Date Requested Status
ownCloud-Sync Devs 2019-02-12 Pending
Review via email: mp+363044@code.launchpad.net

Commit message

fix removing of cloud-server-portnumber, while creating the webdav access-url-path.

Description of the change

Fixes: Bug #1815388, and perhaps Bug #1592782

Retrieves the portnumber if one exists and makes use of the port parameter in QWebdav::setConnectionSettings.

To post a comment you must log in.
slash (slash-tux) wrote :

Thanks, I'll try to create a test version, would you be able to test it ?

Luksus (lukas-baubkus) wrote :

> Thanks, I'll try to create a test version, would you be able to test it ?

Sure.

Unmerged revisions

4. By Luksus on 2019-02-12

If the owncloud/nextcloud host-url contains a special portnumber, the portnumber was truncated when creating the webdav access path.
This fix does keep the portnumber, if one exists.
The port-parameter will be ignored by QWebdav::setConnectionSettings if it is 0.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'OwncloudSync/webdavfolderlistmodel.cpp'
2--- OwncloudSync/webdavfolderlistmodel.cpp 2018-08-09 03:52:33 +0000
3+++ OwncloudSync/webdavfolderlistmodel.cpp 2019-02-12 09:07:47 +0000
4@@ -53,6 +53,10 @@
5 QString url = sUrl.host();
6 qDebug() << "webdav::setConnectionSettings" << "url:" << url;
7
8+ int port = sUrl.port();
9+ if(port == -1) port = 0;
10+ qDebug() << "webdav::setConnectionSettings" << "port:" << port;
11+
12 QString path = sUrl.path();
13 path.append("/remote.php/webdav/");
14 qDebug() << "webdav::setConnectionSettings" << "path:" << path;
15@@ -66,7 +70,7 @@
16 connectionType = QWebdav::HTTP;
17 }
18
19- m_webdav.setConnectionSettings(connectionType, url, path, m_username, m_password);
20+ m_webdav.setConnectionSettings(connectionType, url, path, m_username, m_password, port);
21
22 }
23 }

Subscribers

People subscribed via source and target branches

to all changes: