Fix erroneous warning if Firefox profile directory can't be found

`Zotero.File.getContentsAsync()` now uses IOUtils rather than OS.File
This commit is contained in:
Dan Stillman 2023-05-24 05:00:55 -04:00
parent 14875c962b
commit 0b1d958a86

View file

@ -37,7 +37,7 @@ Zotero.Profile = {
var iniContents = yield Zotero.File.getContentsAsync(profilesIni);
}
catch (e) {
if (e instanceof OS.File.Error && e.becauseNoSuchFile) {
if (e.name == 'NotFoundError') {
return false;
}
throw e;
@ -230,7 +230,7 @@ Zotero.Profile = {
}
}
catch (e) {
if (e instanceof OS.File.Error && e.becauseNoSuchFile) {
if (e.name == 'NotFoundError' || (e instanceof OS.File.Error && e.becauseNoSuchFile)) {
return true;
}
Zotero.debug(e, 2)