From 969a51fa849aaee3aeeb9587ce402a72711d04a9 Mon Sep 17 00:00:00 2001 From: bob Date: Thu, 16 May 2024 20:21:24 -0500 Subject: [PATCH] only make dirs that are needed --- core/Local/Project.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/core/Local/Project.php b/core/Local/Project.php index be44337..effde60 100644 --- a/core/Local/Project.php +++ b/core/Local/Project.php @@ -176,6 +176,11 @@ protected function RunDirectories(string $DestRoot, Common\Date $When): Common\Datastore { + if($this->Dirs->Count() === 0) + return new Common\Datastore; + + //////// + $Commands = new Common\Datastore; $BackupRoot = $this->GetBackupRoot($DestRoot, $When, 'dirs'); Common\Filesystem\Util::MkDir($BackupRoot); @@ -197,6 +202,11 @@ protected function RunRepos(string $DestRoot, Common\Date $When): Common\Datastore { + if($this->Repos->Count() === 0) + return new Common\Datastore; + + //////// + $Commands = new Common\Datastore; $BackupRoot = $this->GetBackupRoot($DestRoot, $When, 'repos'); Common\Filesystem\Util::MkDir($BackupRoot); @@ -218,6 +228,11 @@ protected function RunDatabases(string $DestRoot, Common\Date $When): Common\Datastore { + if($this->Databases->Count() === 0) + return new Common\Datastore; + + //////// + $Commands = new Common\Datastore; $BackupRoot = $this->GetBackupRoot($DestRoot, $When, 'dbs'); Common\Filesystem\Util::MkDir($BackupRoot);