Merge pull request #15 from MarkMaldaba/windows_tempfolder_fix
Looks good to me.
This commit is contained in:
commit
99884c2800
|
@ -89,6 +89,15 @@ class ProjectController extends b8\Controller
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$tempPath = sys_get_temp_dir() . '/';
|
$tempPath = sys_get_temp_dir() . '/';
|
||||||
|
|
||||||
|
// FastCGI fix for Windows machines, where temp path is not available to
|
||||||
|
// PHP, and defaults to the unwritable system directory. If the temp
|
||||||
|
// path is pointing to the system directory, shift to the 'TEMP'
|
||||||
|
// sub-folder, which should also exist, but actually be writable.
|
||||||
|
if ($tempPath == getenv("SystemRoot") . '/') {
|
||||||
|
$tempPath = getenv("SystemRoot") . '/TEMP/';
|
||||||
|
}
|
||||||
|
|
||||||
$id = $tempPath . md5(microtime(true));
|
$id = $tempPath . md5(microtime(true));
|
||||||
if (!is_dir($tempPath)) {
|
if (!is_dir($tempPath)) {
|
||||||
mkdir($tempPath);
|
mkdir($tempPath);
|
||||||
|
|
Loading…
Reference in a new issue