> There still could be the problem that the temporary file will not be > able to be deleted 1) Test for the existence of the destination file. If exists, attempt to open it with write access. If it does exist, then create it. If unable to create/open the destination file then stop. 2) Close the destination file. 3) Perform the Zip operation. If it is successful, copy the temporary file to the destination file. If it fails, delete the destination file if it did not previously exist. I believe that should over all possibilities (except lack of disk space). -- James Turner Russell Peters wrote: > So it looks like we need to use CreateFile with a temporary name (same > extension?). > There still could be the problem that the temporary file will not be able to > be deleted (no permission) but hopefully that does not happen often. > Russell Peters > On Wed, Oct 29, 2008 at 11:32 PM, Patrick Kolla < > patrick.kolla@xxxxxxxxxxxxxxxxxxxx> wrote: > >> (Russell Peters: ) I will remove it from the next release - if you comment >> out that clause does >> it work reasonably? >> Yes, everything works fine without that part. >> >> (James Turner: ) but I would think that using the API function CreateFile >> with the flag CREATE_ALWAYS should work well, >> >> CheckDestWritable (after the volume readonly test) checks FileOpen with >> write access or FileCreate for missing files, so a proper check for the >> writable status should be there. >> >> Patrick Kolla >> >> >> >> ----------- >> To unsubscribe from this list, send an empty e-mail >> message to: >> delphizip-request@xxxxxxxxxxxxx >> and put the word unsubscribe in the subject. >> >> > > > ----------- > To unsubscribe from this list, send an empty e-mail > message to: > delphizip-request@xxxxxxxxxxxxx > and put the word unsubscribe in the subject. > > ----------- To unsubscribe from this list, send an empty e-mail message to: delphizip-request@xxxxxxxxxxxxx and put the word unsubscribe in the subject.