From afb787c84509cf4dd053eafcf5bafaf957054a46 Mon Sep 17 00:00:00 2001 From: Antonin Delpeuch Date: Thu, 6 Jun 2019 17:33:04 +0100 Subject: [PATCH] Disable error message when workspace.json does not exist. Fixes #1989 --- .../src/com/google/refine/io/FileProjectManager.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/main/src/com/google/refine/io/FileProjectManager.java b/main/src/com/google/refine/io/FileProjectManager.java index 271a4f5c6..bdc6957c0 100644 --- a/main/src/com/google/refine/io/FileProjectManager.java +++ b/main/src/com/google/refine/io/FileProjectManager.java @@ -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;