EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Strange Compact behaviour

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#7812
Posted: 10/07/2008 07:37:57
by Jure Bogataj (Priority Standard support level)
Joined: 05/23/2006
Posts: 35

Hello!

I've noticed strange compact behaviour. This is my Compact code:
sfStg := mcSolFS.TmcSolFSStorage.CreateOpen(sFileName);
try
if sfStg.Compact then
bCompactOK := True;
else
ShowError(...);
except
on E : Exception do
AddSolFSErrorLog(E, 'Compact', sFileName);
end; // try..except
sfStg.Close(True);
FreeAndNil(sfStg);

This code did not compact my Storage File (size was cca. 12MB) and also no error was thrown (Compact returned TRUE). Size after calling Compact was the same. Using SolFSExplorer I've checked that storage contains no files. Using SolFSExplorer also Compacted the same file correctly.
When looking at SolFSExplorer's source code I've noticed that it reads DiskSize property before Compact. I've put that in my code also (just for display purposes; before-->after). Then I've noticed that my storage actually DID get compacted. Just by adding read of DiskSize property?!?

How can this be? Compact must work without using DiskSize property?

Best regards,
Jure
#7817
Posted: 10/07/2008 10:42:02
by Alexander Plas (EldoS Corp.)

Moved to helpdesk.

Reply

Statistics

Topic viewed 1878 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!