diff --git a/src/sfs/sfsZipFS.pas b/src/sfs/sfsZipFS.pas
index e76aa9adf24e6bd3731fe6e76adee2eedc1c2a08..b3a83245b24a00609629b52bf32537e68d32a251 100644 (file)
--- a/src/sfs/sfsZipFS.pas
+++ b/src/sfs/sfsZipFS.pas
procedure DFWADReadDirectory ();
procedure ReadDirectory (); override;
+
+ public
function OpenFileByIndex (const index: Integer): TStream; override;
end;
if (index < 0) or (index >= fFiles.Count) or (fFiles[index] = nil) then exit;
kill := false;
try
+ {
try
fs := TFileStream.Create(fFileName, fmOpenRead or fmShareDenyWrite);
kill := true;
except
fs := fFileStream;
end;
+ }
+ fs := fFileStream;
if TSFSZipFileInfo(fFiles[index]).fMethod = 0 then
begin
result := TSFSPartialStream.Create(fs,
if TSFSZipFileInfo(fFiles[index]).fSize = -1 then
begin
TSFSZipFileInfo(fFiles[index]).fSize := 0;
- //writeln('trying to determine file size...');
+ //writeln('trying to determine file size for [', TSFSZipFileInfo(fFiles[index]).fPath, TSFSZipFileInfo(fFiles[index]).fName, ']');
try
while true do
begin
fs.Seek(TSFSZipFileInfo(fFiles[index]).fOfs, soBeginning);
zs := TZDecompressionStream.Create(fs)
except
+ //writeln('*** CAN''T determine file size for [', TSFSZipFileInfo(fFiles[index]).fPath, TSFSZipFileInfo(fFiles[index]).fName, ']');
FreeAndNil(zs);
if kill then FreeAndNil(fs);
result := nil;