From fe33ad4cb16128c4c651e54481fb72cca94585ec Mon Sep 17 00:00:00 2001 From: Jake Stevenson Date: Mon, 16 Feb 2015 07:22:05 -0600 Subject: [PATCH] Fix possible windows path issue --- src/imagemagick.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/imagemagick.coffee b/src/imagemagick.coffee index cee4f24..48c7ad2 100644 --- a/src/imagemagick.coffee +++ b/src/imagemagick.coffee @@ -1,5 +1,6 @@ exec = require( 'child_process' ).exec async = require( 'async' ) +path = require( 'path' ) class ImageMagick @@ -12,8 +13,8 @@ class ImageMagick dims = parts[ 2 ].split "x" w = parseInt dims[ 0 ] h = parseInt dims[ 1 ] - filename = filepath.split( '/' ).pop() - name = filename.split( '.' ).shift() + filename = path.basename(filepath) + name = path.basename(filepath, path.extname(filepath)) image = width: w