hyperdrive
Advanced tools
Comparing version 2.2.0 to 2.2.1
17
index.js
@@ -5,2 +5,3 @@ var constants = require('constants') | ||
var fs = require('fs') | ||
var mkdirp = require('mkdirp') | ||
var bulk = require('bulk-write-stream') | ||
@@ -111,4 +112,16 @@ var rabin = require('rabin') | ||
} | ||
feed.removeListener('put', kick) | ||
cb(null) | ||
var dest = join(self.directory, entry.name) | ||
fs.stat(dest, function (_, st) { | ||
feed.removeListener('put', kick) | ||
// the size check probably isn't nessary here... | ||
if (st && st.size === entry.size) return cb(null) | ||
// duplicate - just copy it in | ||
mkdirp(path.dirname(dest), function () { | ||
pump(self.createFileStream(entry), fs.createWriteStream(dest), cb) | ||
}) | ||
}) | ||
} | ||
@@ -115,0 +128,0 @@ } |
{ | ||
"name": "hyperdrive", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "A file sharing network based on rabin file chunking and append only feeds of data verified by merkle trees.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53783
629