Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

Commit

Permalink
Fix addImage not working with buffers.
Browse files Browse the repository at this point in the history
  • Loading branch information
assaf committed Nov 14, 2012
1 parent 3257be7 commit 85055c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
## 2.0.1 November 14, 2012

Fix addImage not working with buffers.


## 2.0.0 November 1, 2012

New API for updating structure fields:
Expand Down
5 changes: 3 additions & 2 deletions lib/pass.js
Expand Up @@ -305,8 +305,9 @@ function addImage(file, source, callback) {
file.on("close", callback);
}
} else if (source instanceof Buffer) {
file.end(buffer);
callback();
file.on("close", callback);
file.write(source);
file.end();
} else if (typeof(source) == "function") {
try {
source(file);
Expand Down
2 changes: 1 addition & 1 deletion lib/zip.js
Expand Up @@ -10,8 +10,8 @@


var EventEmitter = require("events").EventEmitter;
var Stream = require("stream").Stream;
var inherits = require("util").inherits;
var Stream = require("stream").Stream;
var Zlib = require("zlib");


Expand Down

0 comments on commit 85055c4

Please sign in to comment.