diff options
author | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-08-27 16:23:34 +0200 |
commit | 62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch) | |
tree | c45c35d35d7a3e32621fba06edc63646930c8efd /server/helpers/utils.ts | |
parent | 84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff) | |
download | PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.gz PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.tar.zst PeerTube-62689b942b71cd1dd0d050c6ed05f884a0b325c2.zip |
Correctly migrate to fs-extra
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 | ||