From cffbed31e837af6dcc85234f715410e1b44a87bf Mon Sep 17 00:00:00 2001 From: aurimasv Date: Fri, 14 Sep 2012 20:09:58 -0500 Subject: [PATCH] Make protocol decision clearer --- chrome/content/zotero/xpcom/translation/translate_item.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index 777d93f28a..64e5e60896 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -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") {