Skip to content

Commit

Permalink
Merge pull request #17 from Trudko/master
Browse files Browse the repository at this point in the history
Added configurable path to local history storage folder
  • Loading branch information
Nicolab committed Apr 1, 2015
2 parents 7fec7a4 + 0b09e08 commit 2cdddfb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/local-history.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* @link https://github.com/Nicolab/atom-local-history
* @license MIT https://github.com/Nicolab/atom-local-history/blob/master/LICENSE.md
*/
var utils = require('./utils');

module.exports = {

Expand All @@ -17,6 +18,8 @@ module.exports = {
// in days
daysLimit: 30,

historyStoragePath: utils.getLocalHistoryPath(),

difftoolCommand: 'meld "{current-file}" "{revision-file}"'
},

Expand Down
2 changes: 1 addition & 1 deletion lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

var fs = require('fs-plus');
var path = require('path');
var localHistoryPath = path.join(__dirname, '..', '..', '..', 'local-history');
var localHistoryPath = atom.config.get('local-history.historyStoragePath') ? atom.config.get('local-history.historyStoragePath') :path.join(__dirname, '..', '..', '..', 'local-history');

module.exports.getFileDate = function getFileDate(filePath) {
var basePath = path.basename(filePath);
Expand Down

0 comments on commit 2cdddfb

Please sign in to comment.