From 5b53f9b3f8e5f0b642e9e9c48cd7574f23e77233 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20S=C3=B8rvig?= Date: Wed, 3 Jan 2024 15:14:19 +0100 Subject: [PATCH] wasm: actually save dropped files to /qt/tmp We were reporting the correct url, but saving to the root of the file system. Pick-to: 6.7 Change-Id: I3e1fd63efb77dd75ccf7a8f44a3211965fe11be8 Reviewed-by: Lorn Potter --- src/plugins/platforms/wasm/qwasmdom.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/platforms/wasm/qwasmdom.cpp b/src/plugins/platforms/wasm/qwasmdom.cpp index 0045f43745c..da88c5b83ea 100644 --- a/src/plugins/platforms/wasm/qwasmdom.cpp +++ b/src/plugins/platforms/wasm/qwasmdom.cpp @@ -170,7 +170,7 @@ void DataTransfer::toMimeDataWithFile(std::function callback) QUrl fileUrl = QUrl::fromLocalFile(qtTmpDir.filePath(QString::fromStdString(webfile.name()))); mimeContext->fileUrls.append(fileUrl); - QFile file(fileName); + QFile file(fileUrl.toLocalFile()); if (!file.open(QFile::WriteOnly)) { qWarning() << "File was not opened"; mimeContext->deref();