main: resolve to absolute path when adding session to history

This commit is contained in:
jean-emmanuel 2017-12-18 09:46:21 +01:00
parent c1dc378603
commit e65d287907
2 changed files with 3 additions and 1 deletions

View file

@ -45,7 +45,7 @@ module.exports = {
if (err || !stats.isFile()) return
// add session to history
sessionlist.unshift(data)
sessionlist.unshift(path.resolve(data))
// remove doubles from history
sessionlist = sessionlist.filter(function(elem, index, self) {
return index == self.indexOf(elem)