diff options
author | Hannah von Reth <hannah.vonreth@owncloud.com> | 2022-02-22 16:04:17 +0300 |
---|---|---|
committer | Hannah von Reth <vonreth@kde.org> | 2022-02-25 17:20:49 +0300 |
commit | b72fee7aa8979caf710a34a51c0e03e5470ddff7 (patch) | |
tree | a82a4a90582361744640f0e5aba59dd2be0ff4bb /src/common | |
parent | 04a14aa9ad64bba1f7ec40b91a8778e6a85a38ba (diff) |
Add asserts to ensure proper concatenated urls
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/utility.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/utility.cpp b/src/common/utility.cpp index c2c1467c4..d9dc7514e 100644 --- a/src/common/utility.cpp +++ b/src/common/utility.cpp @@ -18,8 +18,9 @@ */ #include "config.h" -#include "common/utility.h" +#include "common/asserts.h" #include "common/filesystembase.h" +#include "common/utility.h" #include "version.h" // Note: This file must compile without QtGui @@ -486,7 +487,8 @@ QUrl Utility::concatUrlPath(const QUrl &url, const QString &concatPath, } path += concatPath; // put the complete path together } - + Q_ASSERT(!path.contains(QStringLiteral("//"))); + Q_ASSERT(url.query().isEmpty()); QUrl tmpUrl = url; tmpUrl.setPath(path); tmpUrl.setQuery(queryItems); |