From cf4ecdebe11ec0f1b1db381b27e1e58ad6558d01 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 15 Aug 2004 18:46:12 +0000 Subject: [PATCH] =?UTF-8?q?Fix:=20Meilleure=20gestion=20erreur=20en=20cas?= =?UTF-8?q?=20de=20r=E9pertoire=20inexsitant.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/includes/magpierss/rss_fetch.inc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/htdocs/includes/magpierss/rss_fetch.inc b/htdocs/includes/magpierss/rss_fetch.inc index 936cf383abb..87f0c497a25 100644 --- a/htdocs/includes/magpierss/rss_fetch.inc +++ b/htdocs/includes/magpierss/rss_fetch.inc @@ -340,18 +340,19 @@ function init () { if ( !defined('MAGPIE_CACHE_DIR') ) { // Le rep de cache est defini dans DOL_DATA_ROOT - if (! file_exists(DOL_DATA_ROOT.'/rsscache')) { - if (! file_exists(DOL_DATA_ROOT)) { - mkdir(DOL_DATA_ROOT); - } - mkdir(DOL_DATA_ROOT.'/rsscache'); + $ret=true; + if (! file_exists(DOL_DATA_ROOT)) { + $ret=mkdir(DOL_DATA_ROOT); + } + if ($ret && ! file_exists(DOL_DATA_ROOT.'/rsscache')) { + $ret=mkdir(DOL_DATA_ROOT.'/rsscache'); } define('MAGPIE_CACHE_DIR', DOL_DATA_ROOT.'/rsscache'); // Si le rep de cache n'a pu etre trouvé ou créé, on utilise // l'ancien dans DOL_DOCUMENT_ROOT pour raison de compatibilite // avec anciennes versions - if (! file_exists(DOL_DATA_ROOT.'/rsscache')) { + if (! $ret) { define('MAGPIE_CACHE_DIR', DOL_DOCUMENT_ROOT.'/rsscache'); }