config/packages/dream2nix/overrides/nodejs/shinobi/0004-use-packageDirectory-for-folders.patch

44 lines
1.5 KiB
Diff
Raw Normal View History

From b7f4ce7fc6ee30499a26a74c25a7a580a5ba4368 Mon Sep 17 00:00:00 2001
From: Max <max@privatevoid.net>
Date: Tue, 15 Mar 2022 18:28:48 +0100
Subject: [PATCH 4/9] use packageDirectory for folders
---
libs/folders.js | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/folders.js b/libs/folders.js
index 54f9acc..d35d337 100644
--- a/libs/folders.js
+++ b/libs/folders.js
@@ -3,7 +3,7 @@ module.exports = function(s,config,lang){
//directories
s.group = {}
if(!config.windowsTempDir&&s.isWin===true){config.windowsTempDir='C:/Windows/Temp'}
- if(!config.defaultMjpeg){config.defaultMjpeg=s.mainDirectory+'/web/libs/img/bg.jpg'}
+ if(!config.defaultMjpeg){config.defaultMjpeg=s.packageDirectory+'/web/libs/img/bg.jpg'}
//default stream folder check
if(!config.streamDir){
if(s.isWin === false){
@@ -62,7 +62,7 @@ module.exports = function(s,config,lang){
value:""
}
]
- fs.readdirSync(s.mainDirectory + '/web/libs/audio').forEach(function(file){
+ fs.readdirSync(s.packageDirectory + '/web/libs/audio').forEach(function(file){
s.listOfAudioFiles.push({
name: file,
value: file
@@ -75,7 +75,7 @@ module.exports = function(s,config,lang){
value:""
}
]
- fs.readdirSync(s.mainDirectory + '/web/libs/themes').forEach(function(folder){
+ fs.readdirSync(s.packageDirectory + '/web/libs/themes').forEach(function(folder){
s.listOfThemes.push({
name: folder,
value: folder
--
2.35.1