Changed $rp = realpath to $rp = file_exists because of bug #2290 and 2299

This commit is contained in:
fberckel 2008-05-22 08:07:01 +00:00
parent f592f86a8e
commit f1bce8ba20

View file

@ -45,14 +45,14 @@ if (!camp_db_table_exists($CC_CONFIG['prefTable'])) {
// Install storage directories // Install storage directories
//------------------------------------------------------------------------ //------------------------------------------------------------------------
foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) { foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) {
$rp = realpath($CC_CONFIG[$d]); $rp = file_exists($CC_CONFIG[$d]);
if ( $rp === FALSE ) { if ( $rp === FALSE ) {
echo " * Creating directory ".$CC_CONFIG[$d]."..."; echo " * Creating directory ".$CC_CONFIG[$d]."...";
mkdir($CC_CONFIG[$d], 02775); mkdir($CC_CONFIG[$d], 02775);
echo "done.\n"; echo "done.\n";
$rp = realpath($CC_CONFIG[$d]); $rp = realpath($CC_CONFIG[$d]);
} else { } else {
echo " * Skipping: directory already exists: $rp\n"; echo " * Skipping: directory already exists: ".$CC_CONFIG[$d]."\n";
} }
$CC_CONFIG[$d] = $rp; $CC_CONFIG[$d] = $rp;
} }
@ -89,4 +89,4 @@ $cron->ct->addCron('*/2', '*', '*', '*', '*', realpath("{$CC_CONFIG['cronDir']}/
$cron->closeCrontab(); $cron->closeCrontab();
echo "done.\n"; echo "done.\n";
?> ?>