From: hickert Date: Fri, 19 Nov 2010 11:21:50 +0000 (+0000) Subject: Updated update-gosa to prevent endless loop durin package installation if something... X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=7d6e3c54f24b6f3d9fd78004c5b7269944ff46f7;p=gosa.git Updated update-gosa to prevent endless loop durin package installation if something went wrong git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20289 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/update-gosa b/gosa-core/update-gosa index b0629f5d9..35adabdb0 100755 --- a/gosa-core/update-gosa +++ b/gosa-core/update-gosa @@ -95,7 +95,7 @@ function get_classes($folder= ".") } $dh = opendir("."); - while(false !== ($file = readdir($dh))){ + while(is_resource($dh) && false !== ($file = readdir($dh))){ if (preg_match("/.*\.svn.*/", $file) || preg_match("/.*smarty.*/i",$file) || @@ -126,7 +126,7 @@ function get_classes($folder= ".") } } - closedir($dh); + @closedir($dh); chdir($currdir); return ($result);