Skip to content

Commit fcfbc85

Browse files
committed
chore: Fix Storage Dir Name
1 parent 518a957 commit fcfbc85

6 files changed

Lines changed: 9 additions & 9 deletions

File tree

WebFiori/Framework/Autoload/ClassLoader.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public static function getCacheArray(): array {
292292
* @throws Exception
293293
*/
294294
public static function getCachePath() : string {
295-
return self::get()->getRoot().DIRECTORY_SEPARATOR.APP_DIR.DIRECTORY_SEPARATOR.'sto'.DIRECTORY_SEPARATOR.self::CACHE_NAME;
295+
return self::get()->getRoot().DIRECTORY_SEPARATOR.APP_DIR.DIRECTORY_SEPARATOR.'Storage'.DIRECTORY_SEPARATOR.self::CACHE_NAME;
296296
}
297297

298298
/**
@@ -838,7 +838,7 @@ private function parseCacheString($str) {
838838
*
839839
*/
840840
private function readCache() {
841-
$autoloadCachePath = $this->getRoot().DIRECTORY_SEPARATOR.APP_DIR.DIRECTORY_SEPARATOR.'sto';
841+
$autoloadCachePath = $this->getRoot().DIRECTORY_SEPARATOR.APP_DIR.DIRECTORY_SEPARATOR.'Storage';
842842
$autoloadCache = $autoloadCachePath.DIRECTORY_SEPARATOR.self::CACHE_NAME;
843843
//For first run, the cache file might not exist.
844844
if (file_exists($autoloadCache)) {

WebFiori/Framework/Scheduler/TaskStatusEmail.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public function __construct($sendAccName, array $receivers = []) {
8888
$this->insert('p')->text('Technical Info:');
8989
$this->insert($this->createTaskInfoTable($activeTask));
9090
$logTxt = implode("\r\n", TasksManager::getLogArray()) . "\r\n";
91-
$file = new File(APP_PATH.'sto'.DS.'logs'.DS.'scheduler'.DS.$activeTask->getTaskName().'-ExecLog-'.date('Y-m-d H-i-s').'.log');
91+
$file = new File(APP_PATH.'Storage'.DS.'Logs'.DS.'Scheduler'.DS.$activeTask->getTaskName().'-ExecLog-'.date('Y-m-d H-i-s').'.log');
9292
$file->setRawData($logTxt);
9393
$file->write(false, true);
9494
$this->addAttachment($file);

WebFiori/Framework/Scheduler/TasksManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,7 @@ private function logExecHelper($forced, $task, File $file) {
941941
*/
942942
private function logTaskExecution($task,$forced = false) {
943943
if ($this->isLogEnabled) {
944-
$logsPath = ROOT_PATH.DS.APP_DIR.DS.'sto'.DS.'logs';
944+
$logsPath = ROOT_PATH.DS.APP_DIR.DS.'Storage'.DS.'Logs';
945945
$logFile = $logsPath.DS.'tasks.log';
946946
$file = new File($logFile);
947947
$file->create(true);

WebFiori/Framework/Scheduler/WebUI/ListTasksPage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function __construct() {
7070
'cols' => 12
7171
])->addChild('v-card');
7272
$card->addChild('v-card-title')->text('Tasks Execution Log');
73-
$file = new File(APP_PATH.'sto'.DS.'logs'.DS.'tasks-execution.log');
73+
$file = new File(APP_PATH.'Storage'.DS.'Logs'.DS.'tasks-execution.log');
7474

7575
if ($file->isExist()) {
7676
$file->read();

WebFiori/Framework/Session/DefaultSessionStorage.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* The default sessions storage engine.
1919
*
2020
* This storage engine will store session state as a file in the folder
21-
* 'app/sto/sessions'. The name of the file that contains session state
21+
* '[APP_DIR]/Storage/Sessions'. The name of the file that contains session state
2222
* will be the ID of the session.
2323
*
2424
* @author Ibrahim
@@ -31,8 +31,8 @@ class DefaultSessionStorage implements SessionStorage {
3131
*
3232
*/
3333
public function __construct() {
34-
$sessionsDirName = 'sessions';
35-
$sessionsStoragePath = APP_PATH.'sto';
34+
$sessionsDirName = 'Sessions';
35+
$sessionsStoragePath = APP_PATH.'Storage';
3636
$this->storeLoc = $sessionsStoragePath.DS.$sessionsDirName;
3737

3838
if (!file_exists($this->storeLoc) && is_writable($sessionsStoragePath)) {

tests/WebFiori/Framework/Tests/Session/SessionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testClose00() {
3030
$session->start();
3131
$session->set('hello','world');
3232
$session->close();
33-
$filePath = ROOT_PATH.DS.'App'.DS.'sto'.DS.'sessions'.DS.$session->getId();
33+
$filePath = ROOT_PATH.DS.'App'.DS.'Storage'.DS.'Sessions'.DS.$session->getId();
3434
$this->assertTrue(File::isFileExist($filePath));
3535
$this->assertFalse($session->isRunning());
3636
$this->assertEquals(0,$session->getStartedAt());

0 commit comments

Comments
 (0)