From 679e3b8beaa53669a67e8d022bc459a99e977f69 Mon Sep 17 00:00:00 2001 From: Vladimir Golovnev Date: Thu, 1 Dec 2022 08:16:43 +0300 Subject: [PATCH] WebAPI: return paths using platform-independent separator format PR #18118. Closes #18096. --- src/webui/api/torrentscontroller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/webui/api/torrentscontroller.cpp b/src/webui/api/torrentscontroller.cpp index 72483e09d..e998cbc7a 100644 --- a/src/webui/api/torrentscontroller.cpp +++ b/src/webui/api/torrentscontroller.cpp @@ -577,7 +577,8 @@ void TorrentsController::filesAction() {KEY_FILE_PRIORITY, static_cast(priorities[index])}, {KEY_FILE_SIZE, torrent->fileSize(index)}, {KEY_FILE_AVAILABILITY, fileAvailability[index]}, - {KEY_FILE_NAME, torrent->filePath(index).toString()} + // need to provide paths using a platform-independent separator format + {KEY_FILE_NAME, torrent->filePath(index).data()} }; const BitTorrent::TorrentInfo::PieceRange idx = info.filePieces(index);