Merge pull request #21543 from owncloud/Larzenegger-master
[CI] Larzenegger master
This commit is contained in:
commit
41106c1967
1 changed files with 6 additions and 5 deletions
|
@ -225,11 +225,6 @@ class TempManager implements ITempManager {
|
|||
if ($temp = getenv('TMPDIR')) {
|
||||
$directories[] = $temp;
|
||||
}
|
||||
$temp = tempnam(__FILE__, '');
|
||||
if (file_exists($temp)) {
|
||||
unlink($temp);
|
||||
$directories[] = dirname($temp);
|
||||
}
|
||||
if ($temp = sys_get_temp_dir()) {
|
||||
$directories[] = $temp;
|
||||
}
|
||||
|
@ -239,6 +234,12 @@ class TempManager implements ITempManager {
|
|||
return $dir;
|
||||
}
|
||||
}
|
||||
|
||||
$temp = tempnam(dirname(__FILE__), '');
|
||||
if (file_exists($temp)) {
|
||||
unlink($temp);
|
||||
return dirname($temp);
|
||||
}
|
||||
throw new \UnexpectedValueException('Unable to detect system temporary directory');
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue