Code

Updated update-gosa to prevent endless loop durin package installation if something...
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Nov 2010 11:21:50 +0000 (11:21 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 19 Nov 2010 11:21:50 +0000 (11:21 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20289 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/update-gosa

index b0629f5d944f97bde465c5c6904ccde050df6ea0..35adabdb02a825a10a0471a281bba939ee68910c 100755 (executable)
@@ -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);