« get me outta code hell

http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/downloaders.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/downloaders.js b/src/downloaders.js
index 138b2d6..663e493 100644
--- a/src/downloaders.js
+++ b/src/downloaders.js
@@ -79,7 +79,7 @@ function makeLocalDownloader() {
     // TODO: Is it necessary to sanitize here?
     // Haha, the answer to "should I sanitize" is probably always YES..
     const base = path.basename(arg, path.extname(arg))
-    const file = dir + '/' + sanitize(base) + '.mp3'
+    const file = dir + '/' + sanitize(base) + path.extname(arg)
     return copyFile(arg, file)
       .then(() => file)
   }