Merge pull request #1099 from atom/win-package-specs

Get bundled package specs passing on windows, fixes #1097
This commit is contained in:
Matt Colyer
2013-11-12 16:07:34 -08:00
3 changed files with 14 additions and 12 deletions

View File

@@ -216,7 +216,8 @@ class Git
#
# Returns a Number representing the status.
getDirectoryStatus: (directoryPath) ->
directoryPath = "#{directoryPath}/"
{sep} = require 'path'
directoryPath = "#{directoryPath}#{sep}"
directoryStatus = 0
for path, status of @statuses
directoryStatus |= status if path.indexOf(directoryPath) is 0

View File

@@ -165,6 +165,7 @@ class Project
# Public: Make the given path relative to the project directory.
relativize: (fullPath) ->
return fullPath if fullPath?.match(/[A-Za-z0-9+-.]+:\/\//) # leave path alone if it has a scheme
@rootDirectory?.relativize(fullPath) ? fullPath
# Public: Returns whether the given path is inside this project.