Make it possible to use an absolute path when loading a blueprint

This commit is contained in:
Matias Griese
2020-12-18 20:53:38 +02:00
parent a24ec2c433
commit ffc93a77a9
3 changed files with 7 additions and 1 deletions

View File

@@ -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`

View File

@@ -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);

View File

@@ -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;
}