diff --git a/chrome/content/zotero-platform/win/overlay.css b/chrome/content/zotero-platform/win/overlay.css index 6eab56783d..849c86b18a 100644 --- a/chrome/content/zotero-platform/win/overlay.css +++ b/chrome/content/zotero-platform/win/overlay.css @@ -2,6 +2,11 @@ margin-left: 5px; } +#zotero-tb-sync-warning { + margin-right: 2px; +} + + #zotero-tb-sync { margin-right: 1px; } diff --git a/chrome/content/zotero/xpcom/storage.js b/chrome/content/zotero/xpcom/storage.js index 239089f615..9ee41e610d 100644 --- a/chrome/content/zotero/xpcom/storage.js +++ b/chrome/content/zotero/xpcom/storage.js @@ -161,7 +161,13 @@ Zotero.Sync.Storage = new function () { _syncInProgress = true; _changesMade = false; - Zotero.Sync.Storage.checkForUpdatedFiles(null, null, _session.includeUserFiles, _session.includeGroupFiles); + try { + Zotero.Sync.Storage.checkForUpdatedFiles(null, null, _session.includeUserFiles, _session.includeGroupFiles); + } + catch (e) { + _syncInProgress = false; + throw (e); + } var lastSyncCheckCallback = function (lastSyncTime) { var downloadFiles = true; @@ -537,7 +543,7 @@ Zotero.Sync.Storage = new function () { if (e.name == 'NS_ERROR_FILE_ACCESS_DENIED') { Zotero.debug(e); // TODO: localize - var fileCannotBeUpdated = "The file '" + file.leafName + var fileCannotBeUpdated = "The file '" + file.path + "' cannot be updated."; var checkFileWindows = "Check that the file is not currently " + "in use and that it is not marked read-only."; @@ -549,7 +555,21 @@ Zotero.Sync.Storage = new function () { ]) + "\n\n" + "Restarting your computer or disabling security " + "software may also help."; - throw (msg); + var e = new Zotero.Error( + msg, + 0, + { + dialogButtonText: "Show File", + dialogButtonCallback: function () { + try { + file.reveal(); + } + // Unsupported on some platforms + catch (e) {} + } + } + ); + throw (e); } throw (e);