diff options
author | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-06-05 11:42:40 +0000 |
---|---|---|
committer | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-06-05 11:42:40 +0000 |
commit | c17f30d65ec5c41e9aa5da470d184f21220bf458 (patch) | |
tree | 893ba1b937fb5b3329e1340dfe09802385ca5b54 | |
parent | 73336ff1bff0d8d3bb483dc3cb34d84a3ae6b075 (diff) | |
download | fpc-c17f30d65ec5c41e9aa5da470d184f21220bf458.tar.gz |
* Fix bug ID 35674, do not create filestream for directories
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@42174 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | packages/paszlib/src/zipper.pp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/paszlib/src/zipper.pp b/packages/paszlib/src/zipper.pp index 985204be04..10318eb612 100644 --- a/packages/paszlib/src/zipper.pp +++ b/packages/paszlib/src/zipper.pp @@ -2147,7 +2147,7 @@ Begin If Assigned(FOnCreateStream) then FOnCreateStream(Self, OutStream, Item); // If FOnCreateStream didn't create one, we create one now. - If (OutStream=Nil) then + If (OutStream=Nil) and (not Item.IsDirectory) then begin if (Path<>'') then ForceDirectories(Path); @@ -2173,7 +2173,8 @@ Begin OutStream := nil; end else - FreeAndNil(OutStream); + if Assigned(OutStream) then + FreeAndNil(OutStream); DoEndOfFile; end; |