Permalink
Browse files

made it so full file paths are returned

  • Loading branch information...
1 parent 41eb2f2 commit 1fff268883507a4c192a036ee28717593f6c50a4 @deoxxa committed Apr 5, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/torrent-util.js
View
@@ -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; }

0 comments on commit 1fff268

Please sign in to comment.