From 145175fdb67414c1c95d89c173f780a058cbb87d Mon Sep 17 00:00:00 2001
From: Florian Schaal <info@schaal-24.de>
Date: Thu, 6 Oct 2016 07:23:53 +0200
Subject: [PATCH] fixed umount backup-dir

---
 server/lib/classes/system.inc.php | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php
index cdd6f06e1a..2724c9a839 100644
--- a/server/lib/classes/system.inc.php
+++ b/server/lib/classes/system.inc.php
@@ -1840,17 +1840,17 @@ class system{
 			if ($this->is_mounted($backup_dir)){
 				exec($mount_cmd);
 				sleep(1);
-			}
-		}
 
-        $unmounted = $this->is_mounted($backup_dir) == 0 ? true : false;
-		if(!$unmounted) {
-			//* send email to admin that backup directory could not be unmounted
-			$global_config = $app->getconf->get_global_config('mail');
-			if($global_config['admin_mail'] != ''){
-				$subject = 'Backup directory '.$backup_dir.' could not be unmounted';
-				$message = "Backup directory ".$backup_dir." could not be unmounted.\n\nThe command\n\n".$mount_cmd."\n\nfailed.";
-				mail($global_config['admin_mail'], $subject, $message);
+		        $unmounted = $this->is_mounted($backup_dir) == 0 ? true : false;
+				if(!$unmounted) {
+					//* send email to admin that backup directory could not be unmounted
+					$global_config = $app->getconf->get_global_config('mail');
+					if($global_config['admin_mail'] != ''){
+						$subject = 'Backup directory '.$backup_dir.' could not be unmounted';
+						$message = "Backup directory ".$backup_dir." could not be unmounted.\n\nThe command\n\n".$mount_cmd."\n\nfailed.";
+						mail($global_config['admin_mail'], $subject, $message);
+					}
+				}
 			}
 		}
 
-- 
GitLab