Add file checks

This commit is contained in:
Georgy Litvinov 2020-08-11 17:45:13 +02:00
parent a8730f979e
commit a419e76793

View file

@ -23,8 +23,11 @@ public class Metadata {
} }
public void read(String metadataFilePath) { public void read(String metadataFilePath) {
if (metadataFilePath == null) {
return;
}
File file = new File(metadataFilePath); File file = new File(metadataFilePath);
if (!file.exists()) { if (!file.exists() || !file.canRead()) {
return; return;
} }
readCSVFile(metadataFilePath); readCSVFile(metadataFilePath);