Skip to content

Commit

Permalink
fixs #5
Browse files Browse the repository at this point in the history
  • Loading branch information
madhums committed Jun 2, 2012
1 parent b3f27b6 commit 34fe07a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/imager.js
Expand Up @@ -232,11 +232,12 @@ Imager.prototype = {
Resize(_resize[k], k)

function Resize(preset, prefix) {
_this.imAction('im.crop', file, _this.genFileName( new_file, prefix ) , preset, function(err){
_this.imAction('im.resize', file, _this.genFileName( new_file, prefix ) , preset, function(err){
if (err) return callback(err)
var key = keys.shift()

if (key) Resize(_resize[key], key)
else if (!key && Object.keys(_crop).length > 0) cb()
else callback(err, new_file)
})
}
Expand Down Expand Up @@ -280,7 +281,7 @@ Imager.prototype = {
})

function addFileToContainer(err, c) {
if (err) return callback(err)
if (err) callback(err)
var options = {
remote: dfile
, headers: {
Expand Down

0 comments on commit 34fe07a

Please sign in to comment.