Code

Print a error message if files are 0-byte long,
[gosa.git] / trunk / gosa-plugins / goto / admin / systems / ppd / class_ppdManager.inc
index db3e50c60c90f55c7887a7cc7c35fae716af36ae..db881d2260709c5b29f8e6f1706c55ea151bb830 100644 (file)
@@ -162,7 +162,11 @@ class ppdManager
        }
 
        function loadProperties($ppdFile)
-       {
+  {
+    if(!(filesize($ppdFile))) {
+      trigger_error(_('Parsing PPD file failed - File has 0 bytes'));
+    }
+
                $group= "";
                $option= "";
                $properties= array();
@@ -290,7 +294,11 @@ class ppdManager
        }
 
        function loadDescription($ppdFile)
-       {
+  {
+    if(!(filesize($ppdFile))) {
+      trigger_error(_('Parsing PPD file failed - File has 0 bytes'));
+    }
+
                $ppdDesc = array();
                                
                /* Only parse complete PPD file again, if it was changed */