commit a025a2d46ad6b17a07dbd859059c072da1e99aa3
parent 82e3cfd288677d5dcebcc1505dcb3610ba68ecfd
Author: Dan Stillman <dstillman@zotero.org>
Date: Wed, 17 Mar 2010 07:59:43 +0000
- Replace "Report Error" with "Show File" in read-only file sync error dialog, and show full file path
- Fix endless sync icon spinning after read-only file sync error
- Adjust spacing of sync error icon on Windows
Diffstat:
2 files changed, 28 insertions(+), 3 deletions(-)
diff --git 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
@@ -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);