From: Kevin Ottens Date: Tue, 7 Jul 2020 14:43:55 +0000 (+0200) Subject: No need to compute base at each loop run X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~107^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f90d6951c297e61e739adad37fed6be971817a68;p=nextcloud-desktop.git No need to compute base at each loop run Signed-off-by: Kevin Ottens --- diff --git a/src/libsync/clientsideencryptionjobs.cpp b/src/libsync/clientsideencryptionjobs.cpp index afd7df08d..1f8a65a7c 100644 --- a/src/libsync/clientsideencryptionjobs.cpp +++ b/src/libsync/clientsideencryptionjobs.cpp @@ -74,6 +74,9 @@ bool GetFolderEncryptStatusJob::finished() */ + QString base = account()->url().path(); + if (base.endsWith(QLatin1Char('/'))) + base.chop(1); QString currFile; int currEncryptedStatus = -1; @@ -83,10 +86,6 @@ bool GetFolderEncryptStatusJob::finished() if (type == QXmlStreamReader::StartElement) { if (reader.name() == QLatin1String("href")) { // If the current file is not a folder, ignore it. - QString base = account()->url().path(); - if (base.endsWith(QLatin1Char('/'))) - base.chop(1); - currFile = reader.readElementText(QXmlStreamReader::SkipChildElements); currFile.remove(base + QLatin1String("/remote.php/webdav/")); if (!currFile.endsWith('/'))