From fca03552e22609ac40ba52da10f914843f12f163 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Fri, 28 Mar 2014 13:54:13 -0700 Subject: [PATCH] Relativize directory path before checking statuses --- src/git.coffee | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/git.coffee b/src/git.coffee index cece6588d..598effb3a 100644 --- a/src/git.coffee +++ b/src/git.coffee @@ -1,4 +1,4 @@ -{join} = require 'path' +{join, sep} = require 'path' _ = require 'underscore-plus' {Emitter, Subscriber} = require 'emissary' @@ -240,8 +240,7 @@ class Git # Returns a {Number} representing the status. This value can be passed to # {::isStatusModified} or {::isStatusNew} to get more information. getDirectoryStatus: (directoryPath) -> - {sep} = require 'path' - directoryPath = "#{directoryPath}#{sep}" + directoryPath = "#{@relativize(directoryPath)}#{sep}" directoryStatus = 0 for path, status of @statuses directoryStatus |= status if path.indexOf(directoryPath) is 0