Merge pull request #2059 from OpenRefine/issue-1989-filenotfound

Disable error message when workspace.json does not exist.
This commit is contained in:
Antonin Delpeuch 2019-06-06 20:57:31 +01:00 committed by GitHub
commit ad9566502f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -363,11 +363,13 @@ public class FileProjectManager extends ProjectManager {
boolean found = false;
try {
ParsingUtilities.mapper.readerForUpdating(this).readValue(file);
found = true;
} catch(IOException e) {
logger.warn(e.toString());
if (file.exists() || file.canRead()) {
try {
ParsingUtilities.mapper.readerForUpdating(this).readValue(file);
found = true;
} catch(IOException e) {
logger.warn(e.toString());
}
}
return found;