From e874edd9f876df7b4020137b3a9b7feb8078b38f Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 27 Aug 2021 16:42:17 +0200 Subject: forceConsistentCasingInFileNames to true --- server/controllers/tracker.ts | 2 +- server/helpers/core-utils.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'server') 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' import express from 'express' import { createServer } from 'http' import proxyAddr from 'proxy-addr' -import { Server as WebSocketServer } from 'ws' +import { WebSocketServer } from 'ws' import { Redis } from '@server/lib/redis' import { logger } from '../helpers/logger' import { 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 function root () { if (rootPath) return rootPath - // We are in /helpers/utils.js - rootPath = join(__dirname, '..', '..') + rootPath = __dirname + if (basename(rootPath) === 'helpers') rootPath = resolve(rootPath, '..') + if (basename(rootPath) === 'server') rootPath = resolve(rootPath, '..') if (basename(rootPath) === 'dist') rootPath = resolve(rootPath, '..') return rootPath -- cgit v1.2.3