Skip to content

Commit 1b93ccb

Browse files
committed
Update App.php
1 parent c7964a6 commit 1b93ccb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

webfiori/framework/App.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ private static function getRoot() {
287287
//Following lines of code assumes that the class exist on the folder:
288288
//\vendor\webfiori\framework\webfiori\framework
289289
//Its used to construct the folder at which index file will exist at
290-
$vendorPath = '\vendor\webfiori\framework\webfiori\framework';
290+
$DS = DIRECTORY_SEPARATOR;
291+
$vendorPath = $DS.'vendor'.$DS.'webfiori'.$DS.'framework'.$DS.'webfiori'.$DS.'framework';
291292
$rootPath = substr(__DIR__, 0, strlen(__DIR__) - strlen($vendorPath));
292293
return $rootPath;
293294
}
@@ -362,7 +363,7 @@ public static function initiate(string $appFolder = 'app', string $publicFolder
362363
/**
363364
* Path to WebFiori's core library.
364365
*/
365-
define('WF_CORE_PATH', ROOT_PATH.DS.'vendor\webfiori\framework\webfiori\framework');
366+
define('WF_CORE_PATH', ROOT_PATH.DS.'vendor'.DS.'webfiori'.DS.'framework'.DS.'webfiori'.DS.'framework');
366367
}
367368
self::initAutoLoader();
368369
self::checkStandardLibs();
@@ -607,7 +608,8 @@ private static function initAutoLoader() {
607608
* Initialize autoloader.
608609
*/
609610
if (!class_exists('webfiori\framework\autoload\ClassLoader',false)) {
610-
require_once WF_CORE_PATH.DIRECTORY_SEPARATOR.'autoload'.DIRECTORY_SEPARATOR.'ClassLoader.php';
611+
$autoloader = WF_CORE_PATH.DIRECTORY_SEPARATOR.'autoload'.DIRECTORY_SEPARATOR.'ClassLoader.php';
612+
require_once $autoloader;
611613
}
612614
self::$AU = ClassLoader::get();
613615

0 commit comments

Comments
 (0)