projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dd551a
)
Fix video removing when it is corrupted
author
Chocobozzz
<florian.bigard@gmail.com>
Thu, 19 Oct 2017 07:28:35 +0000
(09:28 +0200)
committer
Chocobozzz
<florian.bigard@gmail.com>
Thu, 19 Oct 2017 07:28:35 +0000
(09:28 +0200)
server/models/video/video.ts
patch
|
blob
|
history
diff --git
a/server/models/video/video.ts
b/server/models/video/video.ts
index fb18a485a4ed0bc1a5359761f434436469a6009e..4bd8eb98f5221a529c50b3165511c62add0623e0 100644
(file)
--- a/
server/models/video/video.ts
+++ b/
server/models/video/video.ts
@@
-334,12
+334,15
@@
function afterDestroy (video: VideoInstance, options: { transaction: Sequelize.T
// Remove physical files and torrents
video.VideoFiles.forEach(file => {
- video.removeFile(file),
-
video.removeTorrent(file
)
+ tasks.push(video.removeFile(file))
+
tasks.push(video.removeTorrent(file)
)
})
}
return Promise.all(tasks)
+ .catch(err => {
+ logger.error('Some errors when removing files of video %d in after destroy hook.', video.uuid, err)
+ })
}
getOriginalFile = function (this: VideoInstance) {