mirror of
https://github.com/atom/atom.git
synced 2026-01-23 05:48:10 -05:00
Check if name matches before resolving path
Path resolution hits the filesystem so check for a name match first.
This commit is contained in:
@@ -161,6 +161,8 @@ class PackageManager
|
||||
@emit 'loaded'
|
||||
|
||||
loadPackage: (nameOrPath) ->
|
||||
return pack if pack = @getLoadedPackage(nameOrPath)
|
||||
|
||||
if packagePath = @resolvePackagePath(nameOrPath)
|
||||
name = path.basename(nameOrPath)
|
||||
return pack if pack = @getLoadedPackage(name)
|
||||
|
||||
Reference in New Issue
Block a user