ZipExtraction Problem

Tyro nospam at home.com
Mon Jun 16 18:04:00 PDT 2008


The following snippet downloads a zipfile from the internet if not resident on my computer. Problem is, it won't move past this point.
I keep getting the error: "Error: ZipException: no end record." How do I solve this problem?

    ZipArchive zipFile;
    if(!exists(file))
    {
        char[] result = myCurl.downloadToString();
        write(file, result);
        zipFile = new ZipArchive(file);
    }
    else
    {
        zipFile = new ZipArchive(file);
    }

My program works if I always download the file and work directly with it instead of saving it. But that is way too time consuming. Also, how would I go about getting a list of the files on the site so that I can then choose the most current to work with?

Finally, if I download a file using a browser the copy on my computer has all the original attributes of the one on the remote server, however, that's not the case when I use download programmatically. Any pointers on how to do this correctly?

Thanks,
Tyro


More information about the Digitalmars-d-learn mailing list