#1894 workaround - ensures the buffer dir exists
This commit is contained in:
parent
114e75e52b
commit
4259cf0c08
|
@ -58,12 +58,12 @@ $config = array(
|
|||
'StationPrefsGr'=> 'StationPrefs',
|
||||
'AllGr' => 'All',
|
||||
'TrashName' => 'trash_',
|
||||
'storageDir' => realpath(dirname(__FILE__).'/../../storageServer/var/stor'),
|
||||
'bufferDir' => realpath(dirname(__FILE__).'/../../storageServer/var/stor/buffer'),
|
||||
'transDir' => realpath(dirname(__FILE__).'/../../storageServer/var/trans'),
|
||||
'accessDir' => realpath(dirname(__FILE__).'/../../storageServer/var/access'),
|
||||
'pearPath' => realpath(dirname(__FILE__).'/../../../../usr/lib/pear'),
|
||||
'cronDir' => realpath(dirname(__FILE__).'/../../storageServer/var/cron'),
|
||||
'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor',
|
||||
'bufferDir' => dirname(__FILE__).'/../../storageServer/var/stor/buffer',
|
||||
'transDir' => dirname(__FILE__).'/../../storageServer/var/trans',
|
||||
'accessDir' => dirname(__FILE__).'/../../storageServer/var/access',
|
||||
'pearPath' => dirname(__FILE__).'/../../../../usr/lib/pear',
|
||||
'cronDir' => dirname(__FILE__).'/../../storageServer/var/cron',
|
||||
'isArchive' => FALSE,
|
||||
'validate' => TRUE,
|
||||
'useTrash' => TRUE,
|
||||
|
@ -153,4 +153,15 @@ if (!is_null($this_file)) {
|
|||
}
|
||||
}
|
||||
|
||||
// make dirpaths better (without ../)
|
||||
foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) {
|
||||
$rp = realpath($config[$d]);
|
||||
// workaround for missing dirs
|
||||
if ( $rp === FALSE ) {
|
||||
mkdir( $config[$d] );
|
||||
$rp = realpath($config[$d]);
|
||||
}
|
||||
$config[$d] = $rp;
|
||||
}
|
||||
|
||||
?>
|
|
@ -56,12 +56,12 @@ $config = array(
|
|||
'StationPrefsGr'=> 'StationPrefs',
|
||||
'AllGr' => 'All',
|
||||
'TrashName' => 'trash_',
|
||||
'storageDir' => realpath(dirname(__FILE__).'/../../storageServer/var/stor'),
|
||||
'bufferDir' => realpath(dirname(__FILE__).'/../../storageServer/var/stor/buffer'),
|
||||
'transDir' => realpath(dirname(__FILE__).'/../../storageServer/var/trans'),
|
||||
'accessDir' => realpath(dirname(__FILE__).'/../../storageServer/var/access'),
|
||||
'storageDir' => dirname(__FILE__).'/../../storageServer/var/stor',
|
||||
'bufferDir' => dirname(__FILE__).'/../../storageServer/var/stor/buffer',
|
||||
'transDir' => dirname(__FILE__).'/../../storageServer/var/trans',
|
||||
'accessDir' => dirname(__FILE__).'/../../storageServer/var/access',
|
||||
'pearPath' => 'ls_lib_dir/pear',
|
||||
'cronDir' => realpath(dirname(__FILE__).'/../../storageServer/var/cron'),
|
||||
'cronDir' => dirname(__FILE__).'/../../storageServer/var/cron',
|
||||
'isArchive' => FALSE,
|
||||
'validate' => TRUE,
|
||||
'useTrash' => TRUE,
|
||||
|
@ -125,4 +125,15 @@ $config['sysSubjs'] = array(
|
|||
$old_ip = get_include_path();
|
||||
set_include_path('.'.PATH_SEPARATOR.$config['pearPath'].PATH_SEPARATOR.$old_ip);
|
||||
|
||||
// make dirpaths better (without ../)
|
||||
foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) {
|
||||
$rp = realpath($config[$d]);
|
||||
// workaround for missing dirs
|
||||
if ( $rp === FALSE ) {
|
||||
mkdir( $config[$d] );
|
||||
$rp = realpath($config[$d]);
|
||||
}
|
||||
$config[$d] = $rp;
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in New Issue