mirror of
https://github.com/atom/atom.git
synced 2026-04-06 03:02:13 -04:00
Normalize forward slashes on windows
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user