aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--stella.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/stella.js b/stella.js
index cdd6c76..6beb85a 100644
--- a/stella.js
+++ b/stella.js
@@ -39,7 +39,7 @@ let PLUGIN_INFO =
<name lang="ja">すてら</name>
<description>For Niconico/YouTube/Vimeo, Add control commands and information display(on status line).</description>
<description lang="ja">ニコニコ動画/YouTube/Vimeo 用。操作コマンドと情報表示(ステータスライン上に)追加します。</description>
- <version>0.30.0</version>
+ <version>0.30.1</version>
<author mail="anekos@snca.net" homepage="http://d.hatena.ne.jp/nokturnalmortum/">anekos</author>
<license>new BSD License (Please read the source code comments of this plugin)</license>
<license lang="ja">修正BSDライセンス (ソースコードのコメントを参照してください)</license>
@@ -321,13 +321,13 @@ Thanks:
} else {
file = dm.userDownloadsDirectory;
}
- if (file.exists()) {
- if (file.isDirectory() && title) {
+
+ if (file.exists() && file.isDirectory() && title)
file.appendRelativePath(U.fixFilename(title) + ext);
- } else {
- return U.echoerr('The file already exists! -> ' + file.path);
- }
- }
+
+ if (file.exists())
+ return U.echoerr('The file already exists! -> ' + file.path);
+
file = makeFileURI(file);
let dl = dm.addDownload(0, U.makeURL(url, null, null), file, title, null, null, null, null, wbp);