diff options
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r-- | server/helpers/utils.ts | 5 |
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' | |||
2 | import { CONFIG } from '../initializers' | 2 | import { CONFIG } from '../initializers' |
3 | import { ActorModel } from '../models/activitypub/actor' | 3 | import { ActorModel } from '../models/activitypub/actor' |
4 | import { ApplicationModel } from '../models/application/application' | 4 | import { ApplicationModel } from '../models/application/application' |
5 | import { pseudoRandomBytesPromise, sha256, unlinkPromise } from './core-utils' | 5 | import { pseudoRandomBytesPromise, sha256 } from './core-utils' |
6 | import { logger } from './logger' | 6 | import { logger } from './logger' |
7 | import { join } from 'path' | 7 | import { join } from 'path' |
8 | import { Instance as ParseTorrent } from 'parse-torrent' | 8 | import { Instance as ParseTorrent } from 'parse-torrent' |
9 | import { remove } from 'fs-extra' | ||
9 | 10 | ||
10 | function deleteFileAsync (path: string) { | 11 | function 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 | ||