From 675001ed6f7eaadbe960d0aed70b2e5a259cf4aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Guillot?= Date: Sat, 5 Apr 2014 22:10:10 -0400 Subject: [PATCH] Do not remove .htaccess during auto-update sync --- models/auto_update.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/models/auto_update.php b/models/auto_update.php index 314a447..565e637 100644 --- a/models/auto_update.php +++ b/models/auto_update.php @@ -59,11 +59,14 @@ function synchronize($source_directory, $destination_directory) foreach ($remove_files as $file) { - $destination_file = $destination_directory.DIRECTORY_SEPARATOR.$file; - \Model\Config\debug('[REMOVE] '.$destination_file); + if ($file !== '.htaccess') { - if (! @unlink($destination_file)) { - return false; + $destination_file = $destination_directory.DIRECTORY_SEPARATOR.$file; + \Model\Config\debug('[REMOVE] '.$destination_file); + + if (! @unlink($destination_file)) { + return false; + } } }