Comparing version 0.1.0 to 0.1.1
@@ -398,4 +398,18 @@ var fs = require('fs'); | ||
var range = options.range; | ||
var start = range.hasOwnProperty("start") ? range.start : 0; | ||
var end = range.hasOwnProperty("end") ? range.end : stat.size - 1; | ||
var start, end; | ||
if (range.hasOwnProperty("start")) { | ||
start = range.start; | ||
end = range.hasOwnProperty("end") ? range.end : meta.size - 1; | ||
} | ||
else { | ||
if (range.hasOwnProperty("end")) { | ||
start = meta.size - range.end; | ||
end = meta.size - 1; | ||
} | ||
else { | ||
meta.rangeNotSatisfiable = "Invalid Range"; | ||
fs.close(fd); | ||
return callback(null, meta); | ||
} | ||
} | ||
if (end < start || start < 0 || end >= stat.size) { | ||
@@ -402,0 +416,0 @@ meta.rangeNotSatisfiable = "Range out of bounds"; |
@@ -9,3 +9,3 @@ { | ||
"description": "A vfs implementation that works on the local filesystem, but with optional security constraints", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"repository": { | ||
@@ -12,0 +12,0 @@ "type": "git", |
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
29175
740