Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Commit

Permalink
fixes #51
Browse files Browse the repository at this point in the history
  • Loading branch information
cdowdy committed Sep 13, 2017
1 parent 4733e64 commit 8dd5a85
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Helpers/FilePathHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
} else {
return $this->app['resources']->getPath( 'filespath' );
} else {
return $this->app['path_resolver']->resolve('files');

}
}
Expand Down

0 comments on commit 8dd5a85

Please sign in to comment.