]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/commitdiff
forceConsistentCasingInFileNames to true
authorChocobozzz <me@florianbigard.com>
Fri, 27 Aug 2021 14:42:17 +0000 (16:42 +0200)
committerChocobozzz <me@florianbigard.com>
Mon, 30 Aug 2021 07:37:18 +0000 (09:37 +0200)
server/controllers/tracker.ts
server/helpers/core-utils.ts
tsconfig.json

index da9c68c6cf1438fee044b6c6a438edf9b05ff2d1..6d60639b880e66da7a213abe58b0273881d46736 100644 (file)
@@ -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'
index 7f28cfc8b1306151b7f551459428d64b34637a0d..2cbf0f8fe5eabf19df83ef29a3206063db99a57a 100644 (file)
@@ -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
index ada13dc9871bdd9b08794770bb06b6ccd9c6c11c..075a3d86eccb416e9946e92a51b4005ecb70cb0d 100644 (file)
@@ -10,6 +10,7 @@
     "removeComments": true,
     "strictBindCallApply": true,
     "esModuleInterop": true,
+    "forceConsistentCasingInFileNames": true,
     "outDir": "./dist",
     "lib": [
       "dom",
@@ -20,7 +21,6 @@
       "es2019"
     ],
     "typeRoots": [
-      "node_modules/sitemap/node_modules/@types",
       "node_modules/@types",
       "server/typings"
     ],