mirror of
https://github.com/demostf/migrate.git
synced 2026-06-03 17:24:10 +02:00
create missing directories
This commit is contained in:
parent
9e88898d7a
commit
9234171b8e
1 changed files with 5 additions and 1 deletions
|
|
@ -16,7 +16,11 @@ class Store {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function generatePath(string $name): string {
|
public function generatePath(string $name): string {
|
||||||
return $this->baseDir . $this->getPrefix($name) . $name;
|
$parent = $this->baseDir . $this->getPrefix($name);
|
||||||
|
if (!is_dir($parent)) {
|
||||||
|
mkdir($parent, 0777, true);
|
||||||
|
}
|
||||||
|
return $parent . $name;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getPrefix(string $name): string {
|
private function getPrefix(string $name): string {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue