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(); }