aboutsummaryrefslogtreecommitdiffstats
path: root/pixiv.js
diff options
context:
space:
mode:
authormitsugu oyama2011-09-15 16:53:51 +0900
committermitsugu oyama2011-09-15 16:53:51 +0900
commit22955ce6e44959be4b9bf3fba6f2b01330926637 (patch)
treeb7e252dc6522d3451c76981bb41ca49137a7c6b3 /pixiv.js
parent542a870aae92cd3d6024180b153bcf200089a0a7 (diff)
downloadvimperator-plugins-22955ce6e44959be4b9bf3fba6f2b01330926637.tar.bz2
fix regression : illegal path name ( include '?' )
Diffstat (limited to 'pixiv.js')
-rw-r--r--pixiv.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/pixiv.js b/pixiv.js
index 5d88e47..2dddfda 100644
--- a/pixiv.js
+++ b/pixiv.js
@@ -187,6 +187,9 @@ commands.addUserCommand(
let getDestPath=function(url){
let fname=url.substr(url.lastIndexOf('/')+1);
+ if(fname.lastIndexOf('?')!=-1){
+ fname=fname.substr(0,fname.lastIndexOf('?'));
+ }
let path=saveDirectory.clone();
path.append(fname);
let aFile=Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);