Update storage.php

This commit is contained in:
Namhyeon Go 2018-09-03 10:30:00 +09:00 committed by GitHub
parent 18f8bee467
commit 6898571131
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,11 +20,21 @@ if(!function_exists("get_current_working_dir")) {
case "basename":
$working_dir = basename(__DIR__);
break;
case "pwd":
case "unix":
if(loadHelper("exectool")) {
$working_dir = exec_command("pwd");
}
break;
case "windows":
if(loadHelper("exectool")) {
$exec_contents = implode("\r\n", array("@echo off", "SET var=%cd%", "ECHO %var%"));
$exec_file = write_storage_file($file_contents, array(
"filename" => "pwd.bat"
));
$working_dir = exec_command($exec_file);
}
break;
}
return $working_dir;