mirror of
https://github.com/atom/atom.git
synced 2026-02-08 13:45:09 -05:00
cwd could change, limit search to plugin folder in bundle.
This commit is contained in:
@@ -153,5 +153,5 @@ bindKey 'toggleProjectDrawer', 'Command-Ctrl-N', (env) ->
|
||||
|
||||
|
||||
## load plugins
|
||||
plugins = _.map Dir.list("./plugins"), (plugin) ->
|
||||
require plugin
|
||||
plugins = _.map Dir.list(Chrome.appRoot() + "/plugins"), (plugin) ->
|
||||
require plugin
|
||||
|
||||
@@ -108,6 +108,9 @@ Chrome =
|
||||
frame = fullscreenWindow.frameRectForContentRect(fullscreenWindow.screen.frame)
|
||||
fullscreenWindow.setFrame_display_animate frame, true, true
|
||||
|
||||
appRoot: ->
|
||||
OSX.NSBundle.mainBundle.resourcePath
|
||||
|
||||
# Handles the file system
|
||||
File =
|
||||
read: (path) ->
|
||||
@@ -119,8 +122,7 @@ File =
|
||||
if /~/.test path
|
||||
OSX.NSString.stringWithString(path).stringByExpandingTildeInPath
|
||||
else if path.indexOf('./') is 0
|
||||
root = OSX.NSBundle.mainBundle.resourcePath
|
||||
"#{root}/#{path}"
|
||||
"#{Chrome.appRoot}/#{path}"
|
||||
else
|
||||
path
|
||||
isFile: (path) ->
|
||||
|
||||
Reference in New Issue
Block a user