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

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();