From 7fcc93aa5b29188c098ba72ae60ba46a22e90b21 Mon Sep 17 00:00:00 2001 From: Llewellyn van der Merwe Date: Tue, 11 Sep 2018 13:15:39 +0200 Subject: [PATCH] Fixed gh-336 so that folders are created if they don't yet exist during the moving of custom files. --- README.md | 2 +- admin/README.txt | 2 +- admin/helpers/compiler/b_Structure.php | 9 ++++++++- componentbuilder.xml | 2 +- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d2d4d18f5..c590b6f59 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 10th September, 2018 ++ *Last Build*: 11th September, 2018 + *Version*: 2.9.0 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/README.txt b/admin/README.txt index d2d4d18f5..c590b6f59 100644 --- a/admin/README.txt +++ b/admin/README.txt @@ -125,7 +125,7 @@ Watch the [proposed development workflow](https://vdm.bz/proposed-development-wo + *Author*: [Llewellyn van der Merwe](mailto:llewellyn@joomlacomponentbuilder.com) + *Name*: [Component Builder](https://github.com/vdm-io/Joomla-Component-Builder) + *First Build*: 30th April, 2015 -+ *Last Build*: 10th September, 2018 ++ *Last Build*: 11th September, 2018 + *Version*: 2.9.0 + *Copyright*: Copyright (C) 2015 - 2018 Vast Development Method. All rights reserved. + *License*: GNU General Public License version 2 or later; see LICENSE.txt diff --git a/admin/helpers/compiler/b_Structure.php b/admin/helpers/compiler/b_Structure.php index 6f901c8c9..097d5f874 100644 --- a/admin/helpers/compiler/b_Structure.php +++ b/admin/helpers/compiler/b_Structure.php @@ -818,6 +818,13 @@ class Structure extends Get } else { + // get base name && get the path only + $packageFullPath0nly = str_replace(basename($packageFullPath), '', $packageFullPath); + // check if path exist, if not creat it + if (!JFolder::exists($packageFullPath0nly)) + { + JFolder::create($packageFullPath0nly); + } // move the file to its place JFile::copy($currentFullPath, $packageFullPath); // count the file created @@ -838,7 +845,7 @@ class Structure extends Get else { // move the folder to its place - JFolder::copy($currentFullPath, $packageFullPath); + JFolder::copy($currentFullPath, $packageFullPath, '', true); // count the folder created $this->folderCount++; } diff --git a/componentbuilder.xml b/componentbuilder.xml index 0e9688fe8..70712c19c 100644 --- a/componentbuilder.xml +++ b/componentbuilder.xml @@ -1,7 +1,7 @@ COM_COMPONENTBUILDER - 10th September, 2018 + 11th September, 2018 Llewellyn van der Merwe llewellyn@joomlacomponentbuilder.com http://www.joomlacomponentbuilder.com