aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers/api
diff options
context:
space:
mode:
Diffstat (limited to 'server/controllers/api')
-rw-r--r--server/controllers/api/videos/import.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/import.ts b/server/controllers/api/videos/import.ts
index 099ab7b8d..98366cd82 100644
--- a/server/controllers/api/videos/import.ts
+++ b/server/controllers/api/videos/import.ts
@@ -21,7 +21,7 @@ import { VideoChannelModel } from '../../../models/video/video-channel'
21import * as Bluebird from 'bluebird' 21import * as Bluebird from 'bluebird'
22import * as parseTorrent from 'parse-torrent' 22import * as parseTorrent from 'parse-torrent'
23import { getSecureTorrentName } from '../../../helpers/utils' 23import { getSecureTorrentName } from '../../../helpers/utils'
24import { readFile, rename } from 'fs-extra' 24import { readFile, move } from 'fs-extra'
25 25
26const auditLogger = auditLoggerFactory('video-imports') 26const auditLogger = auditLoggerFactory('video-imports')
27const videoImportsRouter = express.Router() 27const videoImportsRouter = express.Router()
@@ -71,7 +71,7 @@ async function addTorrentImport (req: express.Request, res: express.Response, to
71 71
72 // Rename the torrent to a secured name 72 // Rename the torrent to a secured name
73 const newTorrentPath = join(CONFIG.STORAGE.TORRENTS_DIR, getSecureTorrentName(torrentName)) 73 const newTorrentPath = join(CONFIG.STORAGE.TORRENTS_DIR, getSecureTorrentName(torrentName))
74 await rename(torrentfile.path, newTorrentPath) 74 await move(torrentfile.path, newTorrentPath)
75 torrentfile.path = newTorrentPath 75 torrentfile.path = newTorrentPath
76 76
77 const buf = await readFile(torrentfile.path) 77 const buf = await readFile(torrentfile.path)