From 085ab0e660b7d3b57e00f00bc5cf90429d5cb241 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 13 Sep 2011 17:06:07 +0300 Subject: [PATCH] WebUI: Fix torrent file upload on Windows --- src/webui/httpconnection.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/webui/httpconnection.cpp b/src/webui/httpconnection.cpp index 121eb33f1..917e1ce5a 100644 --- a/src/webui/httpconnection.cpp +++ b/src/webui/httpconnection.cpp @@ -414,6 +414,11 @@ void HttpConnection::respondCommand(QString command) std::cerr << "I/O Error: Could not create temporary file" << std::endl; return; } +#ifdef Q_WS_WIN + // Change extension to .torrent on Windows or loading will fail + QFile::rename(filePath, filePath+".torrent"); + filePath += ".torrent"; +#endif emit torrentReadyToBeDownloaded(filePath, false, QString(), false); delete tmpfile; // Prepare response