Skip to content
Permalink
Browse files

Ignore potentially unsafe files

  • Loading branch information...
BRKurek committed Apr 27, 2019
1 parent 52237e3 commit 4f8585178af78f8f64c5ca38e923c306613278b9
Showing with 10 additions and 0 deletions.
  1. +10 −0 lib/parse.js
@@ -38,6 +38,7 @@ function Parse () {
me._stream = new BlockStream(512)
me.position = 0
me._ended = false
me._entries = []

me._stream.on("error", function (e) {
me.emit("error", e)
@@ -250,7 +251,16 @@ Parse.prototype._startEntry = function (c) {

if (onend) entry.on("end", onend)

if (entry.type === "File") {
this._entries.forEach(function(prevEntry) {
if (prevEntry.type === "Link" && prevEntry.path === entry.path) {
ev = "ignoredEntry"
}
})
}

this._entry = entry
this._entries.push(entry)
var me = this

entry.on("pause", function () {

0 comments on commit 4f85851

Please sign in to comment.
You can’t perform that action at this time.