Fixed issue in PHP code where if the type is specified as hd, rascsi ignores the file name to figure out the type

This commit is contained in:
akuker
2020-08-28 19:06:48 -05:00
parent 612e7c2e51
commit 21a17d3558

View File

@@ -239,9 +239,11 @@ function check_are_you_sure($prompt){
function action_connect_new_device(){
// If we already know the type & filename, we can go connect the device...
if(isset($_POST['type']) && isset($_POST['file_name'])){
$command = 'rasctl -i '.$_POST['id'].' -c attach -t '.type_string_to_rasctl_type($_POST['type']);
$command = 'rasctl -i '.$_POST['id'].' -c attach ';
if($_POST['file_name'] != "None"){
$command = $command.' -f '.$GLOBALS['FILE_PATH'].'/'.$_POST['file_name'];
}else{
$command = $command.' -t '.type_string_to_rasctl_type($_POST['type']);
}
exec($command, $retArray, $result);
check_result($result, $command, $retArray);