From 29ac6465a048fbe9c29ee6cc3231fa3347b9bf80 Mon Sep 17 00:00:00 2001 From: ftimme <ft@falkotimme.com> Date: Tue, 10 Sep 2013 12:11:20 -0400 Subject: [PATCH] - Make sure tar backups are not deleted because of a return value of 1; tar can return 1 because of harmless warnings but still produces valid backups. --- server/cron_daily.php | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/server/cron_daily.php b/server/cron_daily.php index 362484f..7793bb2 100644 --- a/server/cron_daily.php +++ b/server/cron_daily.php @@ -1135,7 +1135,7 @@ $web_backup_file = 'web'.$web_id.'_'.date('Y-m-d_H-i').'.tar.gz'; exec('tar pczf '.escapeshellarg($web_backup_dir.'/'.$web_backup_file).' --exclude=backup\* --directory '.escapeshellarg($web_path).' .', $tmp_output, $retval); } - if($retval == 0){ + if($retval == 0 || $backup_mode != 'userzip'){ // tar can return 1 (due to harmless warings) and still create valid backups chown($web_backup_dir.'/'.$web_backup_file, 'root'); chgrp($web_backup_dir.'/'.$web_backup_file, 'root'); chmod($web_backup_dir.'/'.$web_backup_file, 0750); -- Gitblit v1.9.1