Fix: Don't use absolute path to config outside of docker

This commit is contained in:
Dorian Zedler 2022-05-11 23:58:26 +02:00
parent 26972d1c4e
commit 5e12b93756
Signed by: dorian
GPG Key ID: 989DE36109AFA354
1 changed files with 2 additions and 1 deletions

View File

@ -16,7 +16,7 @@ class SyncedTimer
private $_basepath;
private $_resourcePath;
private $_path;
private $_dataFile = "/config/data/data.json";
private $_dataFile;
private $_storageHelper;
public function __construct($translations)
@ -24,6 +24,7 @@ class SyncedTimer
session_start();
$this->_translations = $translations;
$this->_dataFile = file_exists("/.dockerenv") ? "/config/data/data.json":"./data.json";
$this->_storageHelper = new StorageHelper($this->_dataFile);
$this->_calculateBasepath();