Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.12.1
-
None
-
-
a4deceac006cadf46123b07526e63750d44f0849 293c925a4f7500865089f23760fa46ed11585c4c
Description
The path returned by QWebEngineDownloadItem::path() contains native separators ('\' on Windows) instead of the standardized '/' used in Qt.
For instance the following code
connect(profile, &QWebEngineProfile::downloadRequested, this, [this](QWebEngineDownloadItem *dl) { qDebug() << "Download request:" << dl->path(); });
will generate the following output
Download request: "C:\\Users\\User\\Downloads\\downloaded_file (1).ext"
while I was expecting
Download request: "C:/Users/User/Downloads/downloaded_file (1).ext"
This happens only when there is already a file with the same name in the download folder and the file must be renamed with a number.
On the first download path will be C:/Users/User/Downloads/downloaded_file.ext, but for the second download it will be C:\Users\User\Downloads\downloaded_file (1).ext.