From 068fecdd821531b568f2512e136a09ecad55d51e Mon Sep 17 00:00:00 2001 From: zivillian Date: Sun, 3 Sep 2023 22:17:19 +0200 Subject: [PATCH] don't set length for stdout --- RfpProxy.Pcap/PcapClient.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RfpProxy.Pcap/PcapClient.cs b/RfpProxy.Pcap/PcapClient.cs index 86efe82..49cf84e 100644 --- a/RfpProxy.Pcap/PcapClient.cs +++ b/RfpProxy.Pcap/PcapClient.cs @@ -15,7 +15,10 @@ abstract class PcapClient : ProxyClient public PcapClient(string socket, Stream file) : base(socket) { _file = file; - _file.SetLength(0); + if (_file.CanSeek) + { + _file.SetLength(0); + } WritePcapHeader(); }