aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r--server/helpers/utils.ts5
1 files changed, 3 insertions, 2 deletions
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'
2import { CONFIG } from '../initializers' 2import { CONFIG } from '../initializers'
3import { ActorModel } from '../models/activitypub/actor' 3import { ActorModel } from '../models/activitypub/actor'
4import { ApplicationModel } from '../models/application/application' 4import { ApplicationModel } from '../models/application/application'
5import { pseudoRandomBytesPromise, sha256, unlinkPromise } from './core-utils' 5import { pseudoRandomBytesPromise, sha256 } from './core-utils'
6import { logger } from './logger' 6import { logger } from './logger'
7import { join } from 'path' 7import { join } from 'path'
8import { Instance as ParseTorrent } from 'parse-torrent' 8import { Instance as ParseTorrent } from 'parse-torrent'
9import { remove } from 'fs-extra'
9 10
10function deleteFileAsync (path: string) { 11function deleteFileAsync (path: string) {
11 unlinkPromise(path) 12 remove(path)
12 .catch(err => logger.error('Cannot delete the file %s asynchronously.', path, { err })) 13 .catch(err => logger.error('Cannot delete the file %s asynchronously.', path, { err }))
13} 14}
14 15