Copy php application even if directory exists but is empty

parent 14a83ba7
...@@ -40,10 +40,14 @@ class Recipe(GenericBaseRecipe): ...@@ -40,10 +40,14 @@ class Recipe(GenericBaseRecipe):
def install(self): def install(self):
path_list = [] path_list = []
# Copy application # Copy application if not already existing
if not os.path.exists(self.options['htdocs']): htdocs_location = self.options['htdocs']
shutil.copytree(self.options['source'], if not (os.path.exists(htdocs_location) and os.listdir(htdocs_location)):
self.options['htdocs']) try:
os.rmdir(htdocs_location)
except:
pass
shutil.copytree(self.options['source'], htdocs_location)
# Install php.ini # Install php.ini
php_ini = self.createFile(os.path.join(self.options['php-ini-dir'], php_ini = self.createFile(os.path.join(self.options['php-ini-dir'],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment