diff --git a/lib/torrent-util.js b/lib/torrent-util.js index 2a31d09..923e088 100644 --- a/lib/torrent-util.js +++ b/lib/torrent-util.js @@ -159,7 +159,7 @@ exports.get_files = function(torrent) { if (typeof torrent.info.files == "object" && torrent.info.files instanceof Array) { return torrent.info.files.map(function(file) { if (typeof file != "object") { return; } - if (typeof file.path == "object" && file.path instanceof Array) { file.path = file.path.shift(); } + if (typeof file.path == "object" && file.path instanceof Array) { file.path = file.path.join("/"); } if (typeof file.path == "object" && Buffer.isBuffer(file.path)) { file.path = file.path.toString(); } if (typeof file.path != "string" || typeof file.length != "number") { return; }