From 0491e238828e429e5bc6eaaccc1e1e8263ed8516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= <cedric.dsm@tiolive.com> Date: Tue, 24 Apr 2012 09:50:22 +0200 Subject: [PATCH] LAMP generic: don't erase htdocs at update htdocs can contain user data --- slapos/recipe/apachephp/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/slapos/recipe/apachephp/__init__.py b/slapos/recipe/apachephp/__init__.py index 5dfe7c29d..8815c7848 100644 --- a/slapos/recipe/apachephp/__init__.py +++ b/slapos/recipe/apachephp/__init__.py @@ -37,9 +37,9 @@ class Recipe(GenericBaseRecipe): path_list = [] # Copy application - shutil.rmtree(self.options['htdocs']) - shutil.copytree(self.options['source'], - self.options['htdocs']) + if not os.path.exists(self.options['htdocs']): + shutil.copytree(self.options['source'], + self.options['htdocs']) # Install php.ini php_ini = self.createFile(os.path.join(self.options['php-ini-dir'], -- 2.30.9