- autoexec files
- don't throw if the file fails to save
This commit is contained in:
parent
0b491b3ac7
commit
625533a2d3
1 changed files with 11 additions and 1 deletions
|
@ -55,10 +55,20 @@ namespace CollabVMAgent
|
|||
return;
|
||||
}
|
||||
}
|
||||
try
|
||||
{
|
||||
File.WriteAllBytes(UploadsFolder + @"\" + msg.Filename, msg.FileData);
|
||||
} catch (Exception e)
|
||||
{
|
||||
#if DEBUG
|
||||
Console.WriteLine($"Failed to save {msg.Filename}: {e.Message}");
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
#if DEBUG
|
||||
Console.WriteLine($"Successfully wrote {msg.Filename} ({msg.FileData.Length} bytes)");
|
||||
#endif
|
||||
Process.Start(UploadsFolder + @"\" + msg.Filename, msg.FileData);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue