Fix a bad bug when creating multifile torrents

This commit is contained in:
DC
2016-05-16 01:06:29 -07:00
parent 24c775608e
commit 98f7ba8931

View File

@@ -47,8 +47,8 @@ function CreateTorrentPage (state) {
basePath = pathPrefix
} else {
// Multi file torrent: /a/b/{foo, bar}.jpg -> torrent name "b", path "/a"
defaultName = files[0].name
basePath = path.basename(pathPrefix)
defaultName = path.basename(pathPrefix)
basePath = path.dirname(pathPrefix)
}
var maxFileElems = 100
var fileElems = files.slice(0, maxFileElems).map(function (file) {