Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFPCompression UnzipByIndex Failure
Message
From
17/01/2011 09:23:44
 
 
To
17/01/2011 08:44:39
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
01496351
Message ID:
01496355
Views:
54
>>Hi,
>>
>>I've been using Craig Boyd's VFPCompression.fll for a while now without problems, but recently had a user try to unzip a file and get a failure. The problem occurs when I call:
>>
>>
m.llSuccess = UnzipByIndex(m.lnFileCount, m.tcToFolder)
>>
>>This returns .F. on a particular file: thumbs.db. I believe this is a file that WIndows automatically creates sometimes containing thumbnails of image files (but I may be wrong) and it is not necessary for my program to run.
>>
>>Anyhow, how do I tell why the file did not unzip? This UnzipByIndex apparently only returns .T. or .F.
>>
>>If I use Winzip, the file unzips without a problem.
>
>Thumbs.db is yet another attempt by M$ to use the file system as a database, and directory structure as an index... though they were promising the opposite for the Vista (i.e. a database as a file system and indexed tree for a directory structure).
>
>Thumbs.db has some special attributes, probably HSR, or something like that (can't say, because the last piece of software which insisted on creating it was either removed or replaced years ago on my machine, and all instances of this file were shot summarily). So maybe the error comes up when your process tries to overwrite a file with such attributes in tcToFolder? If that's the case, you may look (Sergey's website or Dimitriy Moguilevets) for some API to set the attributes first to allow deletion, so your process would be able to overwrite it.
>
>In case it still errors out even when the target directory doesn't have its own thumbs.db, then check the docs, every API should have something like GetLastError(), or an interface to pass info into an aError() array.

Hi Dragan,

the destination folder in this case does not have a thumbs.db there. The attributes on the file to be unzipped might be the source of the problem as they are Hidden and System.

As far as getting the last error, I don't think Craig ever got around to that part yet.

UPDATE
A thumbs.db was there in the folder. I had show hidden files and folders on, but needed to set Hide protected operating system files off to see it.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Previous
Reply
Map
View

Click here to load this message in the networking platform