File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535define ('UserFrosting\SRC_DIR_NAME ' , 'src ' );
3636
3737// Full path to Sprinkles directory
38- define ('UserFrosting\SPRINKLES_DIR ' , APP_DIR_NAME . DS . SPRINKLES_DIR_NAME );
38+ define ('UserFrosting\SPRINKLES_DIR ' , APP_DIR . DS . SPRINKLES_DIR_NAME );
3939
4040// Full path to sprinkles schema file
4141define ('UserFrosting\SPRINKLES_SCHEMA_FILE ' , APP_DIR . DS . 'sprinkles.json ' );
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class SprinkleManager
3434 protected $ sprinkles = [];
3535
3636 /**
37- * @var string Relaive path to the sprinkles directory. Will be used to register the location with the ResourceLocator
37+ * @var string Path to the sprinkles directory. Will be used to register the location with the ResourceLocator
3838 */
3939 protected $ sprinklesPath = \UserFrosting \SPRINKLES_DIR . \UserFrosting \DS ;
4040
@@ -60,7 +60,7 @@ public function addResources()
6060 }
6161
6262 /**
63- * Register a sprinkle as a locator location, using relative path to the sprinkle
63+ * Register a sprinkle as a locator location
6464 * @param string $sprinkleName
6565 */
6666 public function addSprinkleResources ($ sprinkleName )
@@ -85,13 +85,12 @@ public function getSprinklePath($sprinkleName)
8585 }
8686
8787 // Get path and make sure it exist
88- $ relPath = $ this ->getSprinklesPath () . $ sprinkle ;
89- $ fullpath = \UserFrosting \ROOT_DIR . \UserFrosting \DS . $ relPath ;
90- if (!file_exists ($ fullpath )) {
91- throw new FileNotFoundException ("Sprinkle ` $ sprinkleName` should be found at ` $ fullpath`, but that directory doesn't exist. " );
88+ $ path = $ this ->getSprinklesPath () . $ sprinkle ;
89+ if (!file_exists ($ path )) {
90+ throw new FileNotFoundException ("Sprinkle ` $ sprinkleName` should be found at ` $ path`, but that directory doesn't exist. " );
9291 }
9392
94- return $ relPath ;
93+ return $ path ;
9594 }
9695
9796 /**
You can’t perform that action at this time.
0 commit comments