Details
Description
With the current 5.14 branch, doing e.g. setPath("/tmp/foo.txt") with a download item saves it to /tmp/foo.txt/foo.txt (i.e. there is an extra directory named like the file).
I suspect this is due to https://codereview.qt-project.org/c/qt/qtwebengine/+/259146 which does this in setPath:
d->downloadDirectory = QFileInfo(path).filePath(); d->downloadFileName = QFileInfo(path).fileName();
However, according to its documentation, QFileInfo::filePath() "returns the file name, including the path (which may be absolute or relative)."
This should probably be something like QFileInfo(path).path() instead? (untested)