commit cffbed31e837af6dcc85234f715410e1b44a87bf parent b94837d3da334b273536099425dd852d7b59a7d3 Author: aurimasv <aurimas.dev@gmail.com> Date: Fri, 14 Sep 2012 20:09:58 -0500 Make protocol decision clearer Diffstat:
| M | 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 @@ -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") {