WebUI: Return full path to files

It's otherwise impossible to know the structure of a torrent.
This commit is contained in:
Gabriele 2015-03-04 20:00:00 +01:00
parent 19b9a84576
commit 4db757839c

View file

@ -479,7 +479,7 @@ QByteArray btjson::getFilesForTorrent(const QString& hash)
h.file_progress(fp); h.file_progress(fp);
for (int i = 0; i < h.num_files(); ++i) { for (int i = 0; i < h.num_files(); ++i) {
QVariantMap file_dict; QVariantMap file_dict;
QString fileName = h.filename_at(i); QString fileName = h.filepath_at(i);
if (fileName.endsWith(".!qB", Qt::CaseInsensitive)) if (fileName.endsWith(".!qB", Qt::CaseInsensitive))
fileName.chop(4); fileName.chop(4);
file_dict[KEY_FILE_NAME] = fsutils::toNativePath(fileName); file_dict[KEY_FILE_NAME] = fsutils::toNativePath(fileName);