Commit 7d70344c authored by Wolfgang Bauer's avatar Wolfgang Bauer

Fix porting bug in UrlChecker::destUrl()

Append a slash to the destination dir if there is no trailing one, like
the KDE4 code did.

Otherwise the destination dir may be wrong under some circumstances.
parent 2ef232b0
......@@ -234,6 +234,7 @@ QUrl UrlChecker::destUrl(const QUrl &destOrFolder, const QUrl &source, const QSt
if (usedFileName.isEmpty()) {
usedFileName = QUrl::toPercentEncoding(source.toString(), "/");
}
if (!dest.path().endsWith('/')) dest.setPath(dest.path() + '/');
dest.setPath(dest.adjusted(QUrl::RemoveFilename).path() + usedFileName);
} else if (!fileName.isEmpty()) {
dest.setPath(dest.adjusted(QUrl::RemoveFilename).path() + fileName);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment