mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Detect resolving absolute paths on windows
This commit is contained in:
@@ -290,7 +290,12 @@ fsExtensions =
|
||||
pathToResolve = args.pop()
|
||||
loadPaths = args
|
||||
|
||||
if pathToResolve[0] is '/'
|
||||
if process.platform is 'win32'
|
||||
isAbsolute = pathToResolve[1] is ':' # C:\ style
|
||||
else
|
||||
isAbsolute = pathToResolve[0] is '/' # /usr style
|
||||
|
||||
if isAbsolute
|
||||
if extensions and resolvedPath = @resolveExtension(pathToResolve, extensions)
|
||||
return resolvedPath
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user