« 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/downloaders.js
diff options
context:
space:
mode:
Diffstat (limited to 'downloaders.js')
-rw-r--r--downloaders.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/downloaders.js b/downloaders.js
index e18c8e0..941c805 100644
--- a/downloaders.js
+++ b/downloaders.js
@@ -32,7 +32,7 @@ const copyFile = (source, target) => {
   })
 }
 
-const disableBackResolving = arg => arg.split('/').map(str => str.replace(/^\../, '_..')).join('/')
+// const disableBackResolving = arg => arg.split('/').map(str => str.replace(/^\../, '_..')).join('/')
 
 const cachify = (identifier, keyFunction, baseFunction) => {
   return async arg => {
@@ -44,7 +44,7 @@ const cachify = (identifier, keyFunction, baseFunction) => {
     // Determine where the final file will end up. This is just a directory -
     // the file's own name is determined by the downloader.
     const cacheDir = downloaders.rootCacheDir + '/' + identifier
-    const finalDirectory = cacheDir + '/' + disableBackResolving(keyFunction(arg))
+    const finalDirectory = cacheDir + '/' + sanitize(keyFunction(arg))
 
     // Check if that directory only exists. If it does, return the file in it,
     // because it being there means we've already downloaded it at some point