Use more reliable test for IOUtils.exists() error

Amendment to e35c220
This commit is contained in:
Abe Jellinek 2024-09-23 11:46:34 +01:00
parent e35c220be4
commit c59c8cbffe

View file

@ -5853,7 +5853,7 @@ var ZoteroPane = new function()
}
catch (e) {
// IOUtils.exists() throws if the path is invalid - suppress that
if (e.name === 'NS_ERROR_FILE_UNRECOGNIZED_PATH') {
if (e.message.includes('Could not parse path')) {
Zotero.debug('Invalid path: ' + correctedPath);
continue;
}