Move storage dir path to Atom

This commit is contained in:
Kevin Sawicki
2013-10-14 18:01:42 -07:00
parent d0e1d32ae9
commit 572157124e
2 changed files with 5 additions and 2 deletions

View File

@@ -251,6 +251,10 @@ class Atom
getConfigDirPath: ->
@configDirPath ?= fs.absolute('~/.atom')
# Public: Get the directory path to Atom's storage area.
getStorageDirPath: ->
@storageDirPath ?= path.join(@getConfigDirPath(), 'storage')
getWindowStatePath: ->
switch @windowMode
when 'spec'
@@ -262,7 +266,7 @@ class Atom
filename = "editor-#{sha1}"
if filename
path.join(@config.userStoragePath, filename)
path.join(@getStorageDirPath(), filename)
else
null

View File

@@ -41,7 +41,6 @@ class Config
if atom.getLoadSettings().devMode
@packageDirPaths.unshift(path.join(@configDirPath, "dev", "packages"))
@userPackageDirPaths = _.clone(@packageDirPaths)
@userStoragePath = path.join(@configDirPath, "storage")
@defaultSettings =
core: _.clone(require('./root-view').configDefaults)