Skip to content
This repository was archived by the owner on Apr 13, 2020. It is now read-only.

Commit f06629e

Browse files
committed
Lack of mapcache/ dir causes tests to fail
1 parent 2f33e78 commit f06629e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Diff for: src/main/java/nz/co/fortytwo/signalk/server/RouteManager.java

+6-1
Original file line numberDiff line numberDiff line change
@@ -455,8 +455,13 @@ public void configure0() throws Exception {
455455
}
456456

457457
private void reloadCharts() {
458-
File mapDir = new File(Util.getConfigProperty(STATIC_DIR)+Util.getConfigProperty(MAP_DIR));
458+
String staticDir = Util.getConfigProperty(STATIC_DIR);
459+
if(!staticDir.endsWith("/")){
460+
staticDir=staticDir+"/";
461+
}
462+
File mapDir = new File(staticDir+Util.getConfigProperty(MAP_DIR));
459463
logger.debug("Reloading charts from: "+mapDir.getAbsolutePath());
464+
if(mapDir==null || !mapDir.exists() || mapDir.listFiles()==null)return;
460465
UploadProcessor processor = new UploadProcessor();
461466
for(File chart:mapDir.listFiles()){
462467
if(chart.isDirectory()){

0 commit comments

Comments
 (0)