return FALSE; $r = well_tag_thread__update(array('id' => $id), $update); return $r; } function well_tag_thread_find($tagid, $page, $pagesize) { $arr = well_tag_thread__find(array('tagid' => $tagid), array('id' => -1), $page, $pagesize); return $arr; } function well_tag_thread_find_by_tid($tid, $page, $pagesize) { $arr = well_tag_thread__find(array('tid' => $tid), array(), $page, $pagesize); return $arr; } ?>javascript - Adm Zip - files zipped as folder - Stack Overflow
最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Adm Zip - files zipped as folder - Stack Overflow

programmeradmin6浏览0评论

I am using adm-zip to zip the local directory and all its nested files and directories.

var AdmZip = require('adm-zip');
var pathToZip = process.env.PUBLIC + '/Demo/Backup.zip';
var zip = new AdmZip();
zip.addLocalFolder("C:\\Users\\Public\\Test\\db");
zip.writeZip(pathToZip);

Problem:

All the files are getting added as folders inside the zip and the actual content is not getting zipped.

Where i am wrong?

I am using adm-zip to zip the local directory and all its nested files and directories.

var AdmZip = require('adm-zip');
var pathToZip = process.env.PUBLIC + '/Demo/Backup.zip';
var zip = new AdmZip();
zip.addLocalFolder("C:\\Users\\Public\\Test\\db");
zip.writeZip(pathToZip);

Problem:

All the files are getting added as folders inside the zip and the actual content is not getting zipped.

Where i am wrong?

Share Improve this question asked May 8, 2016 at 8:10 TheKingPinMirzaTheKingPinMirza 8,9826 gold badges53 silver badges83 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 7

There is a bug with the addLocalFolder function in Windows, but there is an easy fix, look at this entry: https://github./cthackers/adm-zip/pull/132/files

Tip: Always check the current state of the library you are working with first. :)

发布评论

评论列表(0)

  1. 暂无评论