aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/controllers/tracker.ts2
-rw-r--r--server/helpers/core-utils.ts5
2 files changed, 4 insertions, 3 deletions
diff --git a/server/controllers/tracker.ts b/server/controllers/tracker.ts
index da9c68c6c..6d60639b8 100644
--- a/server/controllers/tracker.ts
+++ b/server/controllers/tracker.ts
@@ -2,7 +2,7 @@ import { Server as TrackerServer } from 'bittorrent-tracker'
2import express from 'express' 2import express from 'express'
3import { createServer } from 'http' 3import { createServer } from 'http'
4import proxyAddr from 'proxy-addr' 4import proxyAddr from 'proxy-addr'
5import { Server as WebSocketServer } from 'ws' 5import { WebSocketServer } from 'ws'
6import { Redis } from '@server/lib/redis' 6import { Redis } from '@server/lib/redis'
7import { logger } from '../helpers/logger' 7import { logger } from '../helpers/logger'
8import { CONFIG } from '../initializers/config' 8import { CONFIG } from '../initializers/config'
diff --git a/server/helpers/core-utils.ts b/server/helpers/core-utils.ts
index 7f28cfc8b..2cbf0f8fe 100644
--- a/server/helpers/core-utils.ts
+++ b/server/helpers/core-utils.ts
@@ -164,9 +164,10 @@ let rootPath: string
164function root () { 164function root () {
165 if (rootPath) return rootPath 165 if (rootPath) return rootPath
166 166
167 // We are in /helpers/utils.js 167 rootPath = __dirname
168 rootPath = join(__dirname, '..', '..')
169 168
169 if (basename(rootPath) === 'helpers') rootPath = resolve(rootPath, '..')
170 if (basename(rootPath) === 'server') rootPath = resolve(rootPath, '..')
170 if (basename(rootPath) === 'dist') rootPath = resolve(rootPath, '..') 171 if (basename(rootPath) === 'dist') rootPath = resolve(rootPath, '..')
171 172
172 return rootPath 173 return rootPath