diff options
author | Chocobozzz <me@florianbigard.com> | 2018-12-04 16:02:49 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-12-04 16:04:15 +0100 |
commit | 6040f87d143a5fa01db79867ece8197c3ce7be47 (patch) | |
tree | 98e5fcbced3e55df2f51421250eaa57f3c511299 /server/helpers/utils.ts | |
parent | 745778256ced65415b04a9817fc49db70d4b6681 (diff) | |
download | PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.tar.gz PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.tar.zst PeerTube-6040f87d143a5fa01db79867ece8197c3ce7be47.zip |
Add tmp and redundancy directories
Diffstat (limited to 'server/helpers/utils.ts')
-rw-r--r-- | server/helpers/utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/helpers/utils.ts b/server/helpers/utils.ts index 5c9d6fe2f..9b89e3e61 100644 --- a/server/helpers/utils.ts +++ b/server/helpers/utils.ts | |||
@@ -46,11 +46,11 @@ const getServerActor = memoizee(async function () { | |||
46 | return actor | 46 | return actor |
47 | }) | 47 | }) |
48 | 48 | ||
49 | function generateVideoTmpPath (target: string | ParseTorrent) { | 49 | function generateVideoImportTmpPath (target: string | ParseTorrent) { |
50 | const id = typeof target === 'string' ? target : target.infoHash | 50 | const id = typeof target === 'string' ? target : target.infoHash |
51 | 51 | ||
52 | const hash = sha256(id) | 52 | const hash = sha256(id) |
53 | return join(CONFIG.STORAGE.VIDEOS_DIR, hash + '-import.mp4') | 53 | return join(CONFIG.STORAGE.TMP_DIR, hash + '-import.mp4') |
54 | } | 54 | } |
55 | 55 | ||
56 | function getSecureTorrentName (originalName: string) { | 56 | function getSecureTorrentName (originalName: string) { |
@@ -103,6 +103,6 @@ export { | |||
103 | getSecureTorrentName, | 103 | getSecureTorrentName, |
104 | getServerActor, | 104 | getServerActor, |
105 | getServerCommit, | 105 | getServerCommit, |
106 | generateVideoTmpPath, | 106 | generateVideoImportTmpPath, |
107 | getUUIDFromFilename | 107 | getUUIDFromFilename |
108 | } | 108 | } |