aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-caption.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
commit62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch)
treec45c35d35d7a3e32621fba06edc63646930c8efd /server/models/video/video-caption.ts
parent84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff)
downloadPeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.gz
PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.zst
PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.zip
Correctly migrate to fs-extra
Diffstat (limited to 'server/models/video/video-caption.ts')
-rw-r--r--server/models/video/video-caption.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/models/video/video-caption.ts b/server/models/video/video-caption.ts
index 3593646a2..10ef46c14 100644
--- a/server/models/video/video-caption.ts
+++ b/server/models/video/video-caption.ts
@@ -19,7 +19,7 @@ import { VideoCaption } from '../../../shared/models/videos/caption/video-captio
19import { CONFIG, STATIC_PATHS, VIDEO_LANGUAGES } from '../../initializers' 19import { CONFIG, STATIC_PATHS, VIDEO_LANGUAGES } from '../../initializers'
20import { join } from 'path' 20import { join } from 'path'
21import { logger } from '../../helpers/logger' 21import { logger } from '../../helpers/logger'
22import { unlinkPromise } from '../../helpers/core-utils' 22import { remove } from 'fs-extra'
23 23
24export enum ScopeNames { 24export enum ScopeNames {
25 WITH_VIDEO_UUID_AND_REMOTE = 'WITH_VIDEO_UUID_AND_REMOTE' 25 WITH_VIDEO_UUID_AND_REMOTE = 'WITH_VIDEO_UUID_AND_REMOTE'
@@ -172,6 +172,6 @@ export class VideoCaptionModel extends Model<VideoCaptionModel> {
172 } 172 }
173 173
174 removeCaptionFile () { 174 removeCaptionFile () {
175 return unlinkPromise(CONFIG.STORAGE.CAPTIONS_DIR + this.getCaptionName()) 175 return remove(CONFIG.STORAGE.CAPTIONS_DIR + this.getCaptionName())
176 } 176 }
177} 177}