aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
committerChocobozzz <me@florianbigard.com>2018-08-27 16:23:34 +0200
commit62689b942b71cd1dd0d050c6ed05f884a0b325c2 (patch)
treec45c35d35d7a3e32621fba06edc63646930c8efd /server/helpers/utils.ts
parent84b6dbcc6e8654f39ec798905e1151ba915cd1aa (diff)
downloadPeerTube-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.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