From 3146c6bb9f72419c213c8c074592a1063705b925 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 13 Nov 2007 08:58:57 +0000 Subject: [PATCH] Fixed PPD upload if vendor directory wasn't created. git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7785 594d385d-05f5-0310-b6e9-bd551577e9d8 --- plugins/admin/systems/class_printerPPDDialog.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/admin/systems/class_printerPPDDialog.inc b/plugins/admin/systems/class_printerPPDDialog.inc index b2e8819c3..ac3aebc59 100644 --- a/plugins/admin/systems/class_printerPPDDialog.inc +++ b/plugins/admin/systems/class_printerPPDDialog.inc @@ -260,9 +260,6 @@ class printerPPDDialog extends plugin $filename = $this->pathToPPD.$ppdname; $contents = file_get_contents($_PathOnHdd); - /* Open file handle */ - $fp = fopen($filename,"w+"); - /* Create the vendors path, if it doesn't exists already */ if(!is_dir($this->pathToPPD.$vendor)){ if(!(@mkdir($this->pathToPPD.$vendor))){ @@ -271,6 +268,9 @@ class printerPPDDialog extends plugin } } + /* Open file handle */ + $fp = fopen($filename,"w+"); + /* Check file handle & contents */ if(!$fp){ print_red(sprintf(_("Can't save file '%s'."),$filename)); -- 2.30.2