mirror of
https://github.com/getgrav/grav.git
synced 2026-02-28 09:31:32 +01:00
Make it possible to use an absolute path when loading a blueprint
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
|
||||
1. [](#new)
|
||||
* Added support for overriding configuration by using environment variables
|
||||
1. [](#improved)
|
||||
* Make it possible to use an absolute path when loading a blueprint
|
||||
1. [](#bugfix)
|
||||
* Fixed port issue with `system.custom_base_url`
|
||||
|
||||
|
||||
@@ -371,6 +371,10 @@ class Blueprint extends BlueprintForm
|
||||
$locator = Grav::instance()['locator'];
|
||||
|
||||
if (is_string($path) && !$locator->isStream($path)) {
|
||||
if (is_file($path)) {
|
||||
return [$path];
|
||||
}
|
||||
|
||||
// Find path overrides.
|
||||
if (null === $context) {
|
||||
$paths = (array) ($this->overrides[$path] ?? null);
|
||||
|
||||
@@ -208,7 +208,7 @@ class AbstractFile implements FileInterface
|
||||
}
|
||||
|
||||
if ($this->locked) {
|
||||
flock($this->handle, LOCK_UN);
|
||||
flock($this->handle, LOCK_UN | LOCK_NB);
|
||||
$this->locked = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user