backup
Advanced tools
Comparing version 1.0.0-5 to 1.0.0-6
10
index.js
@@ -131,10 +131,12 @@ // Copyright Peter Širka, Web Site Design s.r.o. (www.petersirka.sk) | ||
Backup.prototype.$compress = function() { | ||
var self = this; | ||
var length = self.path.length; | ||
if (self.directory.length > 0) { | ||
self.directory.forEach(function(o) { | ||
if (self.filter(o)) | ||
if (self.filter(o.substring(length))) | ||
fs.appendFileSync(self.fileName, (o.replace(self.path, '') + '/').padRight(100) + ':#\n'); | ||
@@ -153,3 +155,3 @@ }); | ||
if (!self.filter(fileName)) { | ||
if (!self.filter(fileName.substring(length))) { | ||
self.$compress(); | ||
@@ -161,3 +163,3 @@ return; | ||
fs.readFile(fileName, function(err, data) { | ||
fs.readFile(fileName, function(err, data) { | ||
zlib.gzip(data, function(err, data) { | ||
@@ -164,0 +166,0 @@ |
{ | ||
"name": "backup", | ||
"version": "1.0.0-5", | ||
"version": "1.0.0-6", | ||
"description": "Web Site backup & restore", | ||
"main": "./index.js", | ||
"keywords": ["backup", "restore"], | ||
"keywords": ["backup", "restore", "website", "web", "project"], | ||
"engines": { | ||
@@ -8,0 +8,0 @@ "node": ">=0.6.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
11399
260