From 01d3d0057c84cb6415773bc45437c51e2e436a40 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 1 Sep 2010 05:42:02 +0000 Subject: [PATCH] Don't try to download attachments with empty paths, which can't be saved --- chrome/content/zotero/xpcom/storage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index 69878d26e..a58bc493c 100644 --- a/chrome/content/zotero/xpcom/storage.js +++ b/chrome/content/zotero/xpcom/storage.js @@ -1437,7 +1437,9 @@ Zotero.Sync.Storage = new function () { } var sql = "SELECT itemID FROM itemAttachments JOIN items USING (itemID) " - + "WHERE syncState IN (?,?)"; + + "WHERE syncState IN (?,?) " + // Skip attachments with empty path, which can't be saved + + "AND path!=''"; if (includeUserFiles && !includeGroupFiles) { sql += " AND libraryID IS NULL"; }