Skip to content

Commit e363d24

Browse files
committed
sanity check if input folder exists
1 parent 58182ce commit e363d24

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/com/github/rfresh2/JourneyMapWaypointsToXaero.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ public static void main(final String[] args) {
4747
String input = args[0];
4848
String output = args[1];
4949
Path folderIn = new File(String.format("%s/waypoints/", input)).toPath();
50+
if (Files.notExists(folderIn)) {
51+
LOG.error("Input folder does not exist: {}", folderIn);
52+
System.exit(1);
53+
}
5054
LOG.info("Reading JM waypoints from path: {}", folderIn.toAbsolutePath());
5155
List<XaeroWaypoint> xaeroWaypoints = convertWaypoints(folderIn);
5256
xaeroWaypoints.stream()

0 commit comments

Comments
 (0)