Fix: Don't use absolute path to config outside of docker
This commit is contained in:
parent
26972d1c4e
commit
5e12b93756
1 changed files with 2 additions and 1 deletions
|
@ -16,7 +16,7 @@ class SyncedTimer
|
||||||
private $_basepath;
|
private $_basepath;
|
||||||
private $_resourcePath;
|
private $_resourcePath;
|
||||||
private $_path;
|
private $_path;
|
||||||
private $_dataFile = "/config/data/data.json";
|
private $_dataFile;
|
||||||
private $_storageHelper;
|
private $_storageHelper;
|
||||||
|
|
||||||
public function __construct($translations)
|
public function __construct($translations)
|
||||||
|
@ -24,6 +24,7 @@ class SyncedTimer
|
||||||
session_start();
|
session_start();
|
||||||
$this->_translations = $translations;
|
$this->_translations = $translations;
|
||||||
|
|
||||||
|
$this->_dataFile = file_exists("/.dockerenv") ? "/config/data/data.json":"./data.json";
|
||||||
$this->_storageHelper = new StorageHelper($this->_dataFile);
|
$this->_storageHelper = new StorageHelper($this->_dataFile);
|
||||||
|
|
||||||
$this->_calculateBasepath();
|
$this->_calculateBasepath();
|
||||||
|
|
Loading…
Reference in a new issue