Normalize forward slashes on windows

This commit is contained in:
Kevin Sawicki
2013-11-01 12:14:32 -07:00
parent 132c6f7414
commit e8f8cd2dcd

View File

@@ -65,6 +65,9 @@ class Directory
relativize: (fullPath) ->
return fullPath unless fullPath
# Normalize forward slashes to back slashes on windows
fullPath = fullPath.replace(/\//g, '\\') if process.platform is 'windows'
if fullPath is @getPath()
''
else if fullPath.indexOf(path.join(@getPath(), path.sep)) is 0