From 3587bb0f6b9f5fb97a0ba776964c29b1fdb0db97 Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Wed, 29 Apr 2015 17:06:23 -0400 Subject: [PATCH] Fix error if a synced filename begins with a dot (".pdf") --- chrome/content/zotero/xpcom/storage.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index ac1940457..5979af532 100644 --- a/chrome/content/zotero/xpcom/storage.js +++ b/chrome/content/zotero/xpcom/storage.js @@ -1615,7 +1615,7 @@ Zotero.Sync.Storage = new function () { var fileName = entryName; } - if (fileName.indexOf('.') == 0) { + if (fileName.startsWith('.zotero')) { Zotero.debug("Skipping " + fileName); continue; } @@ -1760,7 +1760,7 @@ Zotero.Sync.Storage = new function () { var filesToDelete = []; var file; while (file = otherFiles.nextFile) { - if (file.leafName[0] == '.') { + if (file.leafName.startsWith('.zotero')) { continue; } @@ -1861,7 +1861,7 @@ Zotero.Sync.Storage = new function () { continue; } var fileName = file.getRelativeDescriptor(rootDir); - if (fileName.indexOf('.') == 0) { + if (fileName.startsWith('.zotero')) { Zotero.debug('Skipping file ' + fileName); continue; }