mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Account Migrator: Switch to string comparison for URLs.
QUrl does not normalize trailing slashes, so there is no benefit of using QUrl here.
This commit is contained in:
parent
9d3b09159e
commit
d770f9cc1a
@ -141,13 +141,15 @@ Account* Account::restore()
|
||||
// Check the theme url to see if it is the same url that the oC config was for
|
||||
QString overrideUrl = Theme::instance()->overrideServerUrl();
|
||||
if( !overrideUrl.isEmpty() ) {
|
||||
if (overrideUrl.endsWith('/')) { overrideUrl.chop(1); }
|
||||
QString oCUrl = oCSettings->value(QLatin1String(urlC)).toString();
|
||||
if (oCUrl.endsWith('/')) { oCUrl.chop(1); }
|
||||
|
||||
// in case the urls are equal reset the settings object to read from
|
||||
// the ownCloud settings object
|
||||
qDebug() << "Migrate oC config if " << oCUrl << " == " << overrideUrl << ":"
|
||||
<< (QUrl(oCUrl) == QUrl(overrideUrl) ? "Yes" : "No");
|
||||
if( QUrl(oCUrl) == QUrl(overrideUrl) ) {
|
||||
<< (oCUrl == overrideUrl ? "Yes" : "No");
|
||||
if( oCUrl == overrideUrl ) {
|
||||
migratedCreds = true;
|
||||
settings.reset( oCSettings );
|
||||
} else {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user