thumbs.db messing up my upload routine

Posted by Scott B on Stack Overflow See other posts from Stack Overflow or by Scott B
Published on 2010-03-23T00:24:40Z Indexed on 2010/03/23 3:51 UTC
Read the original article Hit count: 222

Filed under:

I'm getting the following error while uploading a zip archive.

Warning: ZipArchive::extractTo(C:\xampplite\htdocs\testsite/wp-content/themes/mytheme//styles\mytheme/Thumbs.db) [ziparchive.extractto]: failed to open stream: Permission denied in C:\xampplite\htdocs\testsite\wp-content\themes\mythem\uploader.php on line 17

The thing I can't quite figure is that I don't see a thumbs.db file in either the zip archive or the destination folder that was created (the upload still processes, I just get these errors).

The function is below, line 17 is commented...

function openZip($file_to_open) { 
    global $target;  
    $zip = new ZipArchive();  
    $x = $zip->open($file_to_open);  
    if($x === true) {  
        $zip->extractTo($target);  //this is line 17
        $zip->close();  

        unlink($file_to_open);  
    } else {  
        die("There was a problem. Please try again!");  
    }  
}  

© Stack Overflow or respective owner

Related posts about php