Skip to content

Commit 804ede2

Browse files
authored
Merge pull request #182 from adel-bakhshi/master
Fix file corruption problem
2 parents 6ca1a4f + ac74ed3 commit 804ede2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Downloader/ConcurrentStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ public ConcurrentStream(string filename, long initSize, long maxMemoryBufferByte
151151
{
152152
Path = filename;
153153

154-
if (initSize >= 0)
154+
if (initSize >= 0 && Stream.Length == 0)
155155
SetLength(initSize);
156156

157157
Initial(maxMemoryBufferBytes);

0 commit comments

Comments
 (0)