Restore proper error if datadir is inaccessible
This commit is contained in:
parent
4ef7c94374
commit
e1532c6837
1 changed files with 16 additions and 1 deletions
|
@ -416,7 +416,22 @@ const ZOTERO_CONFIG = {
|
|||
observerService.removeObserver(_shutdownObserver, "quit-application", false);
|
||||
});
|
||||
|
||||
Zotero.IPC.init();
|
||||
try {
|
||||
Zotero.IPC.init();
|
||||
}
|
||||
catch (e) {
|
||||
if (e.name == 'NS_ERROR_FILE_ACCESS_DENIED') {
|
||||
var msg = Zotero.localeJoin([
|
||||
Zotero.getString('startupError.databaseCannotBeOpened'),
|
||||
Zotero.getString('startupError.checkPermissions')
|
||||
]);
|
||||
Zotero.startupError = msg;
|
||||
Zotero.debug(e);
|
||||
Components.utils.reportError(e);
|
||||
return false;
|
||||
}
|
||||
throw (e);
|
||||
}
|
||||
|
||||
// Load additional info for connector or not
|
||||
if(Zotero.isConnector) {
|
||||
|
|
Loading…
Add table
Reference in a new issue