From 82448c4a4d367e4e17382ae0c458bdaef3e59d45 Mon Sep 17 00:00:00 2001 From: aurimasv Date: Thu, 21 Mar 2013 03:24:47 -0500 Subject: [PATCH 01/14] Escape special characters in file paths when attaching files --- chrome/content/zotero/xpcom/file.js | 15 +++++++++++++++ .../zotero/xpcom/translation/translate_item.js | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/file.js b/chrome/content/zotero/xpcom/file.js index 084c56bf9..57688d467 100644 --- a/chrome/content/zotero/xpcom/file.js +++ b/chrome/content/zotero/xpcom/file.js @@ -43,6 +43,21 @@ Zotero.File = new function(){ this.getCharsetFromFile = getCharsetFromFile; this.addCharsetListener = addCharsetListener; + /** + * Encode special characters in file paths that might cause problems, + * like # (but preserve slashes or colons) + * + * @param {String} path File path + * @return {String} Encoded file path + */ + this.encodeFilePath = function(path) { + var parts = path.split(/([\\\/:]+)/); + // Every other item is the separator + for (var i=0, n=parts.length; i Date: Thu, 21 Mar 2013 02:42:29 -0500 Subject: [PATCH 02/14] Show error message when attaching file fails. --- chrome/content/zotero/xpcom/translation/translate_item.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/translation/translate_item.js b/chrome/content/zotero/xpcom/translation/translate_item.js index d30c65ed7..aca7e6438 100644 --- a/chrome/content/zotero/xpcom/translation/translate_item.js +++ b/chrome/content/zotero/xpcom/translation/translate_item.js @@ -294,7 +294,7 @@ Zotero.Translate.ItemSaver.prototype = { var uri = IOService.newURI(Zotero.File.encodeFilePath(path), "", this._baseURI); } catch (e) { - var msg = "Error parsing attachment path: " + path; + var msg = "Error parsing attachment path: " + path + "\n" + e.message; Zotero.logError(msg); Zotero.debug("Translate: " + msg, 2); return false; @@ -303,14 +303,14 @@ Zotero.Translate.ItemSaver.prototype = { try { var file = uri.QueryInterface(Components.interfaces.nsIFileURL).file; if (file.path == '/') { - var msg = "Error parsing attachment path: " + path; + var msg = "Error parsing attachment path: " + path + "\nRoot path returned."; Zotero.logError(msg); Zotero.debug("Translate: " + msg, 2); return false; } } catch (e) { - var msg = "Error getting file from attachment path: " + path; + var msg = "Error getting file from attachment path: " + path + "\n" + e.message; Zotero.logError(msg); Zotero.debug("Translate: " + msg, 2); return false; From f5d33a3a0c368867bcae0e5cbb6f1049be121efc Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 22 Mar 2013 02:34:12 -0400 Subject: [PATCH 03/14] Update submodules and versions --- chrome/content/zotero/locale/csl | 2 +- chrome/content/zotero/xpcom/zotero.js | 2 +- install.rdf | 2 +- resource/schema/repotime.txt | 2 +- translators | 2 +- update.rdf | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/chrome/content/zotero/locale/csl b/chrome/content/zotero/locale/csl index 67de2bc8f..5b7a687df 160000 --- a/chrome/content/zotero/locale/csl +++ b/chrome/content/zotero/locale/csl @@ -1 +1 @@ -Subproject commit 67de2bc8f2d22247463b1b84caf9bf0ab100f2fa +Subproject commit 5b7a687df6464af87eaacc4088bd136ec1039d1b diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js index 7aaa5ed41..2781cedf9 100644 --- a/chrome/content/zotero/xpcom/zotero.js +++ b/chrome/content/zotero/xpcom/zotero.js @@ -36,7 +36,7 @@ const ZOTERO_CONFIG = { API_VERSION: 2, PREF_BRANCH: 'extensions.zotero.', BOOKMARKLET_URL: 'https://www.zotero.org/bookmarklet/', - VERSION: "4.0a1.SOURCE" + VERSION: "4.0b1.SOURCE" }; // Commonly used imports accessible anywhere diff --git a/install.rdf b/install.rdf index 75a125ab1..afe9848f2 100644 --- a/install.rdf +++ b/install.rdf @@ -6,7 +6,7 @@ zotero@chnm.gmu.edu Zotero - 4.0a1.SOURCE + 4.0b1.SOURCE Center for History and New Media
George Mason University
Dan Cohen Sean Takats diff --git a/resource/schema/repotime.txt b/resource/schema/repotime.txt index 30a88b5b8..af39ad478 100644 --- a/resource/schema/repotime.txt +++ b/resource/schema/repotime.txt @@ -1 +1 @@ -2013-03-20 06:25:00 +2013-03-22 05:55:00 diff --git a/translators b/translators index ed58b9977..f23d8732c 160000 --- a/translators +++ b/translators @@ -1 +1 @@ -Subproject commit ed58b9977976ed42cdbaab0f129adb83c287664c +Subproject commit f23d8732c02c256423d4fbd6d85f9bca2d5336c2 diff --git a/update.rdf b/update.rdf index 034943baa..43d0e5f92 100644 --- a/update.rdf +++ b/update.rdf @@ -7,7 +7,7 @@ - 4.0a1.SOURCE + 4.0b1.SOURCE {ec8030f7-c20a-464f-9b0e-13a3a9e97384} From 553173f7ba4f1e03320c116a236683e19b5f9a75 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Fri, 22 Mar 2013 03:08:47 -0400 Subject: [PATCH 04/14] Fix cutoff of bottom of Search prefpane on Linux --- chrome/content/zotero/preferences/preferences_search.xul | 2 ++ 1 file changed, 2 insertions(+) diff --git a/chrome/content/zotero/preferences/preferences_search.xul b/chrome/content/zotero/preferences/preferences_search.xul index 9be0c93f0..a73f18a53 100644 --- a/chrome/content/zotero/preferences/preferences_search.xul +++ b/chrome/content/zotero/preferences/preferences_search.xul @@ -110,6 +110,8 @@ + +