From 572157124e1854ec31963050d203151ffd0dd3a0 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Mon, 14 Oct 2013 18:01:42 -0700 Subject: [PATCH] Move storage dir path to Atom --- src/atom.coffee | 6 +++++- src/config.coffee | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/atom.coffee b/src/atom.coffee index af9d90c92..0c06c670f 100644 --- a/src/atom.coffee +++ b/src/atom.coffee @@ -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 diff --git a/src/config.coffee b/src/config.coffee index 64a6e96cb..899b44be4 100644 --- a/src/config.coffee +++ b/src/config.coffee @@ -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)