From 62689b942b71cd1dd0d050c6ed05f884a0b325c2 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 27 Aug 2018 16:23:34 +0200 Subject: Correctly migrate to fs-extra --- server/lib/cache/abstract-video-static-file-cache.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'server/lib/cache') diff --git a/server/lib/cache/abstract-video-static-file-cache.ts b/server/lib/cache/abstract-video-static-file-cache.ts index 3e20c5d2a..7512f2b9d 100644 --- a/server/lib/cache/abstract-video-static-file-cache.ts +++ b/server/lib/cache/abstract-video-static-file-cache.ts @@ -1,6 +1,5 @@ import * as AsyncLRU from 'async-lru' -import { createWriteStream } from 'fs-extra' -import { unlinkPromise } from '../../helpers/core-utils' +import { createWriteStream, remove } from 'fs-extra' import { logger } from '../../helpers/logger' import { VideoModel } from '../../models/video/video' import { fetchRemoteVideoStaticFile } from '../activitypub' @@ -26,7 +25,7 @@ export abstract class AbstractVideoStaticFileCache { }) this.lru.on('evict', (obj: { key: string, value: string }) => { - unlinkPromise(obj.value) + remove(obj.value) .then(() => logger.debug('%s evicted from %s', obj.value, this.constructor.name)) }) } -- cgit v1.2.3