From d9f4162ab9d4a946eaea6076e915ccb4df816445 Mon Sep 17 00:00:00 2001 From: "Tomas V.V.Cox" Date: Tue, 14 May 2002 17:59:41 +0000 Subject: [PATCH] Try to create the dir where the conf file resides before trying to write to it --- pear/PEAR/Config.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pear/PEAR/Config.php b/pear/PEAR/Config.php index dcc6b3e1c2..8e3ed6dbd5 100644 --- a/pear/PEAR/Config.php +++ b/pear/PEAR/Config.php @@ -341,7 +341,10 @@ when installing packages without a version or state specified', } $data = $this->configuration[$layer]; $this->_encodeOutput($data); - if (@file_exists($file) && !@is_writeable($file)) { + if (!@System::mkDir("-p " . dirname($file))) { + return $this->raiseError("could not create directory: " . dirname($file)); + } + if (@is_file($file) && !@is_writeable($file)) { return $this->raiseError("no write access to $file!"); } $fp = @fopen($file, "w"); -- 2.50.1