From b21ab79cfa6f4e4b367ceca8fc1bc7942eb54ae0 Mon Sep 17 00:00:00 2001 From: "Nicolab.net" Date: Wed, 1 Apr 2015 05:48:03 +0200 Subject: [PATCH] [utils] small optimization of PR #17 --- lib/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 50e6e90..5dc65f7 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -7,7 +7,11 @@ var fs = require('fs-plus'); var path = require('path'); -var localHistoryPath = atom.config.get('local-history.historyStoragePath') ? atom.config.get('local-history.historyStoragePath') :path.join(__dirname, '..', '..', '..', 'local-history'); +var localHistoryPath = atom.config.get('local-history.historyStoragePath'); + +if(!localHistoryPath) { + localHistoryPath = path.join(__dirname, '..', '..', '..', 'local-history'); +} module.exports.getFileDate = function getFileDate(filePath) { var basePath = path.basename(filePath);