Move: Fix too many starting slashes in the destination header
authorOlivier Goffart <ogoffart@woboq.com>
Wed, 24 Oct 2018 08:28:26 +0000 (10:28 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:58:15 +0000 (10:58 +0100)
QDir::cleanPath does not remove starting slashes on windows.
So use account::davUrl which is already cleaned

Issue: #6824

src/libsync/propagateremotemove.cpp

index cb955b6086e0a881c318016fb99d55fbe92883d9..9da6986183aeda832ee4303f5e4229b6c53fccde 100644 (file)
@@ -89,8 +89,7 @@ void PropagateRemoteMove::start()
     }
 
     QString source = propagator()->_remoteFolder + _item->_file;
-    QString destination = QDir::cleanPath(propagator()->account()->url().path() + QLatin1Char('/')
-        + propagator()->account()->davPath() + propagator()->_remoteFolder + _item->_renameTarget);
+    QString destination = QDir::cleanPath(propagator()->account()->davUrl().path() + propagator()->_remoteFolder + _item->_renameTarget);
     if (_item->_type == ItemTypeVirtualFile || _item->_type == ItemTypeVirtualFileDownload) {
         auto suffix = propagator()->syncOptions()._virtualFileSuffix;
         ASSERT(source.endsWith(suffix) && destination.endsWith(suffix));