EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Strange Compact behaviour

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
Posted: 10/07/2008 07:37:57
by Jure Bogataj (Priority Standard support level)
Joined: 05/23/2006
Posts: 35


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

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,
Posted: 10/07/2008 10:42:02
by Alexander Plas (EldoS Corp.)

Moved to helpdesk.



Topic viewed 2025 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!