Cache paths are relative to resource path

This commit is contained in:
Kevin Sawicki
2014-10-21 12:26:14 -07:00
parent 6ad96d98b8
commit eab791d47e

View File

@@ -195,13 +195,13 @@ class Package
loadKeymaps: ->
if @bundledPackage and packagesCache[@name]?
@keymaps = (["#{@path}#{path.sep}#{keymapPath}", keymapObject] for keymapPath, keymapObject of packagesCache[@name].keymaps)
@keymaps = (["#{atom.packages.resourcePath}#{path.sep}#{keymapPath}", keymapObject] for keymapPath, keymapObject of packagesCache[@name].keymaps)
else
@keymaps = @getKeymapPaths().map (keymapPath) -> [keymapPath, CSON.readFileSync(keymapPath)]
loadMenus: ->
if @bundledPackage and packagesCache[@name]?
@menus = (["#{@path}#{path.sep}#{menuPath}", menuObject] for menuPath, menuObject of packagesCache[@name].menus)
@menus = (["#{atom.packages.resourcePath}#{path.sep}#{menuPath}", menuObject] for menuPath, menuObject of packagesCache[@name].menus)
else
@menus = @getMenuPaths().map (menuPath) -> [menuPath, CSON.readFileSync(menuPath)]