Fix a bad bug when creating multifile torrents
This commit is contained in:
@@ -47,8 +47,8 @@ function CreateTorrentPage (state) {
|
|||||||
basePath = pathPrefix
|
basePath = pathPrefix
|
||||||
} else {
|
} else {
|
||||||
// Multi file torrent: /a/b/{foo, bar}.jpg -> torrent name "b", path "/a"
|
// Multi file torrent: /a/b/{foo, bar}.jpg -> torrent name "b", path "/a"
|
||||||
defaultName = files[0].name
|
defaultName = path.basename(pathPrefix)
|
||||||
basePath = path.basename(pathPrefix)
|
basePath = path.dirname(pathPrefix)
|
||||||
}
|
}
|
||||||
var maxFileElems = 100
|
var maxFileElems = 100
|
||||||
var fileElems = files.slice(0, maxFileElems).map(function (file) {
|
var fileElems = files.slice(0, maxFileElems).map(function (file) {
|
||||||
|
|||||||
Reference in New Issue
Block a user