From 4013b712bc42ad7660870ecece5ada0fdbdb1fd3 Mon Sep 17 00:00:00 2001 From: Cory Date: Wed, 13 Sep 2017 12:40:17 -0400 Subject: [PATCH] fixes #14 --- src/Helpers/FilePathHelper.php | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/Helpers/FilePathHelper.php b/src/Helpers/FilePathHelper.php index 952adb7..067127d 100644 --- a/src/Helpers/FilePathHelper.php +++ b/src/Helpers/FilePathHelper.php @@ -30,13 +30,20 @@ public function __construct(Application $app) /** * Get Bolt's Files path * @return mixed + * + * The version is "reversed" from what you would logically use.. + * instead of 'this version is greater than or equal too 3.3.0' + * we have to think ok the current bolt version is less than the one we are comparing + * + * example: bolt version 3.2.14 is less than 3.3.0 so + * Version::compare( '3.3.0', '>=') would need to use resources not path_resolver */ public function boltFilesPath() { - if (Version::compare('3.3.0', '>=')) { - return $this->app['path_resolver']->resolve('files'); + if (Version::compare( '3.3.0', '>=')) { + return $this->app['resources']->getPath( 'filespath' ); } else { - return $this->app['resources']->getPath('filespath'); + return $this->app['path_resolver']->resolve('files'); } }