in commons-email2-jakarta/src/main/java/org/apache/commons/mail2/jakarta/resolver/DataSourceFileResolver.java [79:98]
public DataSource resolve(final String resourceLocation, final boolean isLenient) throws IOException {
File file;
DataSource result = null;
if (!isCid(resourceLocation)) {
file = new File(resourceLocation);
if (!file.isAbsolute()) {
file = getBaseDir() != null ? new File(getBaseDir(), resourceLocation) : new File(resourceLocation);
}
if (file.exists()) {
result = new FileDataSource(file);
} else if (!isLenient) {
throw new IOException("Cant resolve the following file resource :" + file.getAbsolutePath());
}
}
return result;
}