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/helpers/utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'server/helpers/utils.ts') diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts index 703e57887..a1ed8e72d 100644 --- a/server/helpers/utils.ts +++ b/server/helpers/utils.ts @@ -2,13 +2,14 @@ import { ResultList } from '../../shared' import { CONFIG } from '../initializers' import { ActorModel } from '../models/activitypub/actor' import { ApplicationModel } from '../models/application/application' -import { pseudoRandomBytesPromise, sha256, unlinkPromise } from './core-utils' +import { pseudoRandomBytesPromise, sha256 } from './core-utils' import { logger } from './logger' import { join } from 'path' import { Instance as ParseTorrent } from 'parse-torrent' +import { remove } from 'fs-extra' function deleteFileAsync (path: string) { - unlinkPromise(path) + remove(path) .catch(err => logger.error('Cannot delete the file %s asynchronously.', path, { err })) } -- cgit v1.2.3