« get me outta code hell

mtui - Music Text User Interface - user-friendly command line music player
about summary refs log tree commit diff
path: root/backend.js
diff options
context:
space:
mode:
Diffstat (limited to 'backend.js')
-rw-r--r--backend.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/backend.js b/backend.js
index 7ee6873..379a16b 100644
--- a/backend.js
+++ b/backend.js
@@ -7,6 +7,7 @@ const { getDownloaderFor } = require('./downloaders')
 const { getMetadataReaderFor } = require('./metadata-readers')
 const { getPlayer } = require('./players')
 const RecordStore = require('./record-store')
+const os = require('os')
 
 const {
   getTimeStringsFromSec,
@@ -568,7 +569,7 @@ class Backend extends EventEmitter {
     this.throttleMetadata = throttlePromise(10)
     this.metadataDictionary = {}
 
-    this.rootDirectory = process.env.HOME + '/.mtui'
+    this.rootDirectory = os.homedir() + '/.mtui'
     this.metadataPath = this.rootDirectory + '/track-metadata.json'
   }