WebAPI: return paths using platform-independent separator format

PR #18118.
Closes #18096.
This commit is contained in:
Vladimir Golovnev 2022-12-01 08:16:43 +03:00 committed by GitHub
parent 25ea0d274b
commit 679e3b8bea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -577,7 +577,8 @@ void TorrentsController::filesAction()
{KEY_FILE_PRIORITY, static_cast<int>(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);