diff options
author | anekos | 2008-11-18 18:01:39 +0000 |
---|---|---|
committer | anekos | 2008-11-18 18:01:39 +0000 |
commit | 4245afeff4c224b32462dd85e45882d9d4afd03c (patch) | |
tree | afbac5552e901762ca09cfd32c63f4dbadf526dc | |
parent | fe3b73d1e345b13239e7a07fa7593b720feca3d6 (diff) | |
download | vimperator-plugins-4245afeff4c224b32462dd85e45882d9d4afd03c.tar.bz2 |
ファイル名の正規化を修正
git-svn-id: http://svn.coderepos.org/share/lang/javascript/vimperator-plugins/trunk@24195 d0d07461-0603-4401-acd4-de1884942a52
-rw-r--r-- | fetchyoutube.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/fetchyoutube.js b/fetchyoutube.js index a2824ab..69ea3b6 100644 --- a/fetchyoutube.js +++ b/fetchyoutube.js @@ -50,14 +50,12 @@ let file; if (filepath) { - filepath = io.expandPath(filepath); - file = io.getFile(filepath); - if (file.isDirectory()) - file.appendRelativePath(title + '.mp4'); + file = io.getFile(io.expandPath(filepath)); } else { file = dm.userDownloadsDirectory; - file.appendRelativePath(title + '.mp4'); } + if (file.isDirectory()) + file.appendRelativePath(fixFilename(title) + '.mp4'); if (file.exists()) return liberator.echoerr('The file already exists! -> ' + file.path); file = makeFileURI(file); @@ -69,7 +67,6 @@ wbp.saveURI(makeURL(url), null, null, null, null, file); liberator.echo('maybe downloading started'); } - //fetch(); commands.addUserCommand( ['fetchyoutube', 'fetchyt'], @@ -79,6 +76,8 @@ true ); + // fetch({}); + })(); // vim:sw=2 ts=2 et si fdm=marker: |