Use the realpath for the handling with (temporary) paths

This commit is contained in:
Michael 2017-07-22 05:50:25 +00:00
commit 5d7e1e1a15
2 changed files with 20 additions and 2 deletions

View file

@ -1399,7 +1399,7 @@ function get_temppath() {
if (($temppath != "") && App::directory_usable($temppath)) {
// We have a temp path and it is usable
return $temppath;
return realpath($temppath);
}
// We don't have a working preconfigured temp path, so we take the system path.
@ -1407,6 +1407,9 @@ function get_temppath() {
// Check if it is usable
if (($temppath != "") && App::directory_usable($temppath)) {
// Always store the real path, not the path through symlinks
$temppath = realpath($temppath);
// To avoid any interferences with other systems we create our own directory
$new_temppath = $temppath . "/" . $a->get_hostname();
if (!is_dir($new_temppath)) {
@ -1495,7 +1498,7 @@ function get_itemcachepath() {
$itemcache = get_config('system', 'itemcache');
if (($itemcache != "") && App::directory_usable($itemcache)) {
return $itemcache;
return realpath($itemcache);
}
$temppath = get_temppath();