Make protocol decision clearer

This commit is contained in:
aurimasv 2012-09-14 20:09:58 -05:00
parent b94837d3da
commit cffbed31e8

View File

@ -215,8 +215,8 @@ Zotero.Translate.ItemSaver.prototype = {
if(!attachment.path) {
// see if this is actually a file URL
var m = urlRe.exec(attachment.url);
var protocol = m ? m[2].toLowerCase() : "";
if(protocol == "file" || protocol == "") {
var protocol = m ? m[2].toLowerCase() : "file";
if(protocol == "file") {
attachment.path = attachment.url;
attachment.url = false;
} else if(protocol != "http" && protocol != "https") {