www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit 24b9612a563c0cfc2353374ba63d3e2f1b067943
parent a9e047cc9e8e9e1d05417822b5a0c1cda76ba026
Author: Dan Stillman <dstillman@zotero.org>
Date:   Tue, 27 Mar 2018 10:17:48 -0400

Force empty storage filenames to '_'

Hopefully fixes https://forums.zotero.org/discussion/71039/sync-error-empty-path-for-item

Diffstat:
Mchrome/content/zotero/xpcom/data/item.js | 2+-
Mchrome/content/zotero/xpcom/storage/storageLocal.js | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/chrome/content/zotero/xpcom/data/item.js b/chrome/content/zotero/xpcom/data/item.js @@ -2810,7 +2810,7 @@ Zotero.defineProperty(Zotero.Item.prototype, 'attachmentFilename', { if (!path) { return ''; } - var prefixedPath = path.match(/^(?:attachments|storage):(.+)$/); + var prefixedPath = path.match(/^(?:attachments|storage):(.*)$/); if (prefixedPath) { return prefixedPath[1]; } diff --git a/chrome/content/zotero/xpcom/storage/storageLocal.js b/chrome/content/zotero/xpcom/storage/storageLocal.js @@ -687,7 +687,7 @@ Zotero.Sync.Storage.Local = { var filename = item.attachmentFilename; if (!filename) { - throw new Error("Empty path for item " + item.key); + Zotero.debug("Empty filename for item " + item.key, 2); } // Don't save Windows aliases if (filename.endsWith('.lnk')) {