ensure that torrent file metadata is present (#869)
This commit is contained in:
@@ -84,8 +84,13 @@ module.exports = class TorrentListController {
|
|||||||
return start()
|
return start()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fileOrFolder = TorrentSummary.getFileOrFolder(s)
|
||||||
|
|
||||||
|
// New torrent: metadata not yet received
|
||||||
|
if (!fileOrFolder) return start()
|
||||||
|
|
||||||
// Existing torrent: check that the path is still there
|
// Existing torrent: check that the path is still there
|
||||||
fs.stat(TorrentSummary.getFileOrFolder(s), function (err) {
|
fs.stat(fileOrFolder, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
s.error = 'path-missing'
|
s.error = 'path-missing'
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user