From 6c9ca1b2dd154abcc97f76883beac348f8c0e06b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tom=C3=A1=C5=A1=20Brada?= Date: Wed, 21 Oct 2015 13:26:44 +0200 Subject: [PATCH] Work to Store. --- Store1.pas | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Store1.pas b/Store1.pas index 2bcad5a..8480241 100644 --- a/Store1.pas +++ b/Store1.pas @@ -34,9 +34,10 @@ procedure tStoreObjectInfo.mkfilen(var d:string; flag:char; const fid:tfid); end; var b,i:byte; begin - d:=prefix+flag+DirectorySeparator; + d:=prefix+flag+'/'; b:=system.length(d); SetLength(d,b+40); + inc(b); for i:=0 to 19 do begin filename[b+(i*2)]:=hc(fid[i] shr 4); filename[b+(i*2)+1]:=hc(fid[i] and $F); @@ -49,7 +50,8 @@ procedure tStoreObjectInfo.Open(const fid:tfid); if dh<>-1 then begin rc:=0; final:=true; - length:=1000; + length:=FileSeek(dh,0,fsFromEnd); + FileSeek(dh,0,fsFromBeginning); end else begin Writeln('Store1: open failed for file ',filename,', ioresult=',IOResult); rc:=2; -- 2.11.4.GIT