diff --git a/index.js b/index.js index 83f3dab..97f907d 100644 --- a/index.js +++ b/index.js @@ -79,9 +79,7 @@ var gulpSass = function gulpSass(options, sync) { // Grab the base file name that's being worked on sassFileSrc = file.relative; // Grab the path portion of the file that's being worked on - sassFileSrcPath = sassFileSrc.split(path.sep); - sassFileSrcPath.pop(); - sassFileSrcPath = sassFileSrcPath.join(path.sep); + sassFileSrcPath = path.dirname(sassFileSrc); if (sassFileSrcPath) { //Prepend the path to all files in the sources array except the file that's being worked on for (sourceFileIndex = 0; sourceFileIndex < sassMap.sources.length; sourceFileIndex++) {