From 77e66a795a37c6fa2238deb8a81b9a66f9cd75e7 Mon Sep 17 00:00:00 2001 From: Martin O'Connor Date: Thu, 30 Jul 2015 22:26:15 -0400 Subject: [PATCH] Use path.dirname for enhanced readability --- index.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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++) {