Skip to content

Commit

Permalink
flexible input path
Browse files Browse the repository at this point in the history
  • Loading branch information
simei94 committed Apr 3, 2024
1 parent 5a6c4a2 commit 7691489
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,14 @@ public Integer call() throws Exception {

writeTripPurposes(joined);

String analysisDir = output.getPath().toString().substring(0, output.getPath().toString().lastIndexOf("\\"));
String analysisDir = "";

if (output.getPath().toString().contains("\\")) {
analysisDir = output.getPath().toString().substring(0, output.getPath().toString().lastIndexOf("\\"));
} else if (output.getPath().toString().contains("/")) {
analysisDir = output.getPath().toString().substring(0, output.getPath().toString().lastIndexOf("/"));
}

Path runDir = Path.of(input.getPath());

if (Path.of(analysisDir).isAbsolute()) {
Expand Down

0 comments on commit 7691489

Please sign in to comment.