From 1a7ba5332c8bf8515a88b5047a328128032cd4de Mon Sep 17 00:00:00 2001 From: Omegadela Date: Tue, 19 Mar 2019 23:24:15 +0100 Subject: [PATCH] [config:export] Warnings on language directories (#3863) --- src/Command/Config/ExportCommand.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Command/Config/ExportCommand.php b/src/Command/Config/ExportCommand.php index b9fc3213e..55bf80460 100644 --- a/src/Command/Config/ExportCommand.php +++ b/src/Command/Config/ExportCommand.php @@ -103,7 +103,9 @@ protected function execute(InputInterface $input, OutputInterface $output) } // Remove previous yaml files before creating new ones - array_map('unlink', glob($directory . '/*')); + foreach (glob($directory . '/*') as $item) { + $fileSystem->remove($item); + } if ($tar) { $dateTime = new \DateTime(); @@ -143,7 +145,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $collection_storage = $this->storage->createCollection($collection); $collection_path = str_replace('.', '/', $collection); if (!$tar) { - mkdir("$directory/$collection_path", 0755, true); + $fileSystem->mkdir("$directory/$collection_path", 0755); } foreach ($collection_storage->listAll() as $name) { $configName = "$collection_path/$name.yml";